[R] ggplot question

From: Williams Scott <Scott.Williams_at_petermac.org>
Date: Thu, 24 Jul 2008 17:23:11 +1000

I am trying to do something simple with ggplot. I wish to draw a density plot split by group, and fill each group with a different colour (and each with an alpha =0.25). I have tried a number of variations of the following, but cannot find a way to define the colour of the fill, its transparency and the line around it individually - something in the syntax continues to defy me.  

ggplot(data.plot, aes(x=x, y=..density..))+


I am sure a simple solution is out there. Any help appreciated,


Dr. Scott Williams


Radiation Oncologist

Peter MacCallum Cancer Centre

Melbourne, Australia

ph +61 3 9656 1111

fax +61 3 9656 1424


This email (including any attachments or links) may contain confidential and/or legally privileged information and is intended only to be read or used by the addressee. If you are not the intended addressee, any use, distribution, disclosure or copying of this email is strictly prohibited.
Confidentiality and legal privilege attached to this email (including any attachments) are not waived or lost by reason of its mistaken delivery to you.
If you have received this email in error, please delete it and notify us immediately by telephone or email. Peter MacCallum Cancer Centre provides no guarantee that this transmission is free of virus or that it has not been intercepted or altered and will not be liable for any delay in its receipt.

        [[alternative HTML version deleted]]

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 24 Jul 2008 - 07:31:28 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 24 Jul 2008 - 16:32:11 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive