On Wed, 24 Sep 2014 02:36:58 PM m...@considine.net wrote:
No, I don't think so. And I've wondered if I described the problem
clearly, so I put together the following hack, which seems to be what
I
want :
#create a matrix to hold the values corresponding to various
percentiles
Hi,
I have a matrix of data, with the rows representing observations and the
columns representing various values that the observation can take on.
In other words, each row can be thought of as a sampling of the density
function/histogram associated with the range of values for that
Does this resemble what you're after?
library(reshape2)
tst - melt(testdataset)
library(ggplot2)
ggplot(tst, aes(x=Var1, y=Var2, fill=value)) +
geom_tile() +
scale_fill_gradient2(low=white,
high=white,
mid=scales::muted(blue),
midpoint=0.6148377)
On Wed, Sep 24, 2014 at 10:26
You missed a few things when copying the example, try
ggplot(testdataset2, aes(y=factor(Var2),x=value)) +
stat_density(aes(fill=..density..), position=identity, geom=tile) +
scale_fill_gradientn(colours=brewer.pal(n=8, name=PuBuGn))
needed to add tile geom, and factor the correct variable.
No, I don't think so. And I've wondered if I described the problem
clearly, so I put together the following hack, which seems to be what I
want :
#create a matrix to hold the values corresponding to various percentiles
vals-matrix(0,32,21)
#for each row in the data, collect info on the
5 matches
Mail list logo