I would like to change the label for the y-axis of a density plot:
> qplot (rnorm(100), geom='density') + ylab ('Density')
however, the ylab() function doesn't seem to work here (nor does the
labs() variant) and the y-axis label remains the default 'density'.
Passing a ylab argument to qplot() doesn't seem to work either. I
copied details of my session below my signature. This is for a
publication and I would need the label to read 'Density' with capital
D.
Heartfelt thanks to Hadley for ggplot2, a truly wonderful package.
Any workaround / help highly appreciated,
Philippe
> sessionInfo()
R version 2.8.1 (2008-12-22)
i386-pc-mingw32
locale:
LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United
Kingdom.1252;LC_MONETARY=English_United
Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices datasets grid tcltk utils
methods base
other attached packages:
[1] car_1.2-10 arm_1.1-17 R2WinBUGS_2.1-8 coda_0.13-3
[5] lme4_0.999375-28 Matrix_0.999375-17 MASS_7.2-45 lattice_0.17-17
[9] foreign_0.8-30 pg_1.0 gmodels_2.14.1 ggplot2_0.8.1
[13] reshape_0.8.2 plyr_0.1.4 proto_0.3-8 svSocket_0.9-5
[17] TinnR_1.0.2 R2HTML_1.59 Hmisc_3.4-4
loaded via a namespace (and not attached):
[1] cluster_1.11.11 gdata_2.4.2 gtools_2.5.0
RColorBrewer_1.0-2 svMisc_0.9-5
[6] tools_2.8.1
brilliant!
thanks so much for such incredible support
Philippe