ggplot(dat.melt,aes(x=width,y=value,fill=variable,colour=variable))+geom_density(stat='identity',alpha=0.5)
the fill and colour variables can be removed if you want.
or
ggplot(dat.melt,aes(x=width,y=value,fill=variable))+geom_density(stat='identity',alpha=0.5)+facet_wrap(~variable,ncol=1)
same
Hi this is exactly what i am looking for but I do not like to draw as
histogram instead I want two separate plot for this data. Something like
the ones shown in the following link. Please disregard the legends of the
following fig.
http://had.co.nz/ggplot2/graphics/55078149a733dd1a0b42a57faf8470
On Thu 12 Jan 2012 09:02:27 AM PST, Mary Kindall wrote:
Hi
I have a data frame in the following form. There are two groups and for
each 'width' relative frequency for group1 and group2 is given. How to plot
this in R using ggplot or other package.
Width relativeFrequency1 relativeFreq
Hi
I have a data frame in the following form. There are two groups and for
each 'width' relative frequency for group1 and group2 is given. How to plot
this in R using ggplot or other package.
Width relativeFrequency1 relativeFrequency2
1 100 0.0006388783 0.02265428
2 200 0.0022677303
4 matches
Mail list logo