[R] How to change the order of the plot?

Uwe Ligges ligges at statistik.tu-dortmund.de
Sun May 11 15:42:05 CEST 2014



On 11.05.2014 10:37, meng wrote:
> boxplot(count ~ spray, data = InsectSprays)
>
>
> The order of the plot is: A,B,C,D,E,F.
> If I want the order of the plot is: F,B,E,A,D,C, how to do then?


For example, you can change the order of the levels, so that you get a 
more natural ordering for your task.

See ?factor

Best,
Uwe Ligges


>
> Many thanks!
>
>
> My best
>
>
>
>
>
>
>
>
>
>
> --
> QQ: 1733768559
>
>
> 	[[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.
>



More information about the R-help mailing list