Dear all, I know that ggplot2 documentation is coming along, but at the moment I can't find how to do the following: a) change the title of the legend b) get rid of the closing line at the bottom of the density line. I also observed that the density lines (after limiting the x-scale) extend a little bit into the surrounding of the plot, which can be seen very strong when plotted as pdf. They extend into the white space between the tick and the plotting panel. p <- ggplot(df, aes(x=distance)) p + stat_density(aes(colour=factor(mark),y=..scaled..), size=1, fill=FALSE) + scale_x_continuous(limits=c(0, 1e4)) + scale_y_continuous("scaled density") thank you very much, ido
Hi Ido, On 7/5/07, Ido M. Tamir <tamir at imp.univie.ac.at> wrote:> Dear all, > > I know that ggplot2 documentation is coming along, > but at the moment I can't find how to do the following: > a) change the title of the legendThere's lot of examples in the documentation - and you seem to have figured how to change the axis labels - so you should find it pretty easy! + scale_colour("new legend name")> b) get rid of the closing line at the bottom of the > density line.Try: + stat_density(..., geom="path")> I also observed that the density lines (after limiting the > x-scale) extend a little bit into the surrounding of the plot, > which can be seen very strong when plotted as pdf. > They extend into the white space between the tick and the > plotting panel.Yes, this is a bug - I'll try and get it fixed in the next version. Thanks, Hadley