I'm just starting to learn how to use ggplot2 and am extremely
impressed with both the software and the community that has developed
around it. My plots are looking better than ever and many of my
colleagues have taken note. Kudos to all involved!
My question is how to merge these two plots into a single one:
ggplot(data) + eas(x='signal') + geom_density()
ggplot(data) + eas(x='signal',color='factor(bin)') + geom_density()
I can get a beautiful density plot of my signal and another for the
density by "bin". What I'm having trouble with is combining both
plots into a single one.
Am I missing something obvious? Any help will be greatly appreciated.
Thanks,
-Kevin
Something like this?
ggplot(data, aes(x= signal)) + geom_density() + geom_density(aes(colour
= bin))
HTH,
Thierry
------------------------------------------------------------------------
----
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek
team Biometrie & Kwaliteitszorg
Gaverstraat 4
9500 Geraardsbergen
Belgium
Research Institute for Nature and Forest
team Biometrics & Quality Assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium
tel. + 32 54/436 185
Thierry....@inbo.be
www.inbo.be
To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to
say what the experiment died of.
~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data.
~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of
data.
~ John Tukey
-----Oorspronkelijk bericht-----
Van: ggp...@googlegroups.com [mailto:ggp...@googlegroups.com] Namens
bioinformed
Verzonden: vrijdag 22 januari 2010 15:42
Aan: ggplot2
Onderwerp: Beginner help
Hi all,
Thanks,
-Kevin
--
You received this message because you are subscribed to the ggplot2
mailing list.
To post to this group, send email to ggp...@googlegroups.com To
unsubscribe from this group, send email to
ggplot2+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/ggplot2
Druk dit bericht a.u.b. niet onnodig af.
Please do not print this message unnecessarily.
Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer
en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is
door een geldig ondertekend document. The views expressed in this message
and any annex are purely those of the writer and may not be regarded as stating
an official position of INBO, as long as the message is not confirmed by a duly
signed document.
Kevin,
Something like this?
ggplot(data, aes(x= signal)) + geom_density() + geom_density(aes(colour
= bin))
----------------------------------------------------------------------------
ir.
Thierry Onkelinx
Instituut voor natuur- en bosonderzoek
team Biometrie
& Kwaliteitszorg
Gaverstraat 4
9500
Geraardsbergen
Belgium
Research Institute for Nature and
Forest
team Biometrics & Quality Assurance
Gaverstraat 4
9500
Geraardsbergen
Belgium
tel. + 32 54/436
185
Thierry....@inbo.be
www.inbo.be
To call in the
statistician after the experiment is done may be no more than asking him to
perform a post-mortem examination: he may be able to say what the experiment
died of.
~ Sir Ronald Aylmer Fisher
The plural of anecdote is not
data.
~ Roger Brinner
The combination of some data and an aching
desire for an answer does not ensure that a reasonable answer can be extracted
from a given body of data.
~ John Tukey