I am interested in creating a boxplot using ggplot or qplot where I can
specify the order of the categories being plotted on the x-axis. For
example, the following command plots the categories (diamond color) in
alphabetic order (D, E, ..., J):

qplot(color, price/carat, data=diamonds, geom="boxplot")

I want to know how I can modify this command so that the categories are
plotted in a different order (say, J, D, E, I, H, F, G).

Thanks in advance.

-Raj.
-- 
View this message in context: 
http://www.nabble.com/ggplot-boxplot---how-to-order-categories-tp19147920p19147920.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@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.

Reply via email to