jrkrideau at inbox.com
Mon Jul 2 15:09:46 CEST 2012
I suppose this means I have to reread that set of changes again. I think I noticed it and promptly forgot it.
Kingston ON Canada
> -----Original Message-----
> From: petr.pikal at precheza.cz
> Sent: Mon, 2 Jul 2012 10:41:20 +0200
> To: jrkrideau at inbox.com
> Subject: Re: [R] geom_boxplot
> In new ggplot2 version following works too
> p + geom_boxplot(aes(fill = factor(cyl))) +
> labs(fill = "Cylinders") + ylab("Miles per Gallon")+xlab("Number
>> Yes you can do all of the things you want.
>> Below is a start, to give you an idea of how to approach some of it.
>> p <- ggplot(mtcars, aes(factor(cyl), mpg))
>> p <- p + geom_boxplot(aes(fill = factor(cyl))) +
>> labs(fill = "Cylinders") +
>> scale_y_continuous("Miles per Gallon") +
>> scale_x_discrete("Number of Cylinders")
>> Have a look at
>> in-ggplot2-r-plots for x and y axes limits.
>> It took me a while to realise it but, generally, I find that it is not
>> hard to find examples of what you need by just googling something like
>> :ggplot2 set x and y limits or ggplot2 geom_bar colour and so on.
>> The ggplot2 and geom_XXX are pretty unique on the internet and search
>> results usually are not too bad.
>> You may also want to subcribe to the ggplot2 group on google groups.
>> Best wishes
>> John Kane
>> Kingston ON Canada
>>> -----Original Message-----
>>> From: hannah.hlx at gmail.com
>>> Sent: Sun, 1 Jul 2012 08:39:20 -0400
>>> To: r-help at r-project.org
>>> Subject: Re: [R] geom_boxplot
>>> Also, it is possible to change "ylim" also?
>>> 2012/7/1 li li <hannah.hlx at gmail.com>
>>>> Dear all,
>>>> I have a few questions regarding the boxplot output from the
>>>> "geom_boxplot" function.
>>>> Attached is the output I get. Below are my questions:
>>>> 1. How can I define the xlab and ylab myself?
>>>> Also I would like to remove "factor(variable)"
>>>> line on the right side.
>>>> 2. How can I define the colors of the boxplots myself.
>>>> For example, I want to use blue for
>>>> "LR", green for "pair" and purple for "BR1".
>>>> Thanks so much!
>>> [[alternative HTML version deleted]]
>>> R-help at r-project.org mailing list
>>> PLEASE do read the posting guide
>>> and provide commented, minimal, self-contained, reproducible code.
>> FREE ONLINE PHOTOSHARING - Share your photos online with your friends
> and family!
>> Visit http://www.inbox.com/photosharing to find out more!
>> R-help at r-project.org mailing list
>> PLEASE do read the posting guide
>> and provide commented, minimal, self-contained, reproducible code.
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
More information about the R-help