[R] ggplot seq

Felipe Carrillo mazatlanmexico at yahoo.com
Thu Jan 22 23:53:43 CET 2009


Hi Hadley: Not sure if you received my email, so I am resending it again.
I have dealt with this before and I can't remember how it got resolved. It is too much data to reproduce the example below(49.000 records) but all I am after is trying to get the x axis breaks. I want my x axis to go from 27 to 51 and 1 to 25 by 2. I am trying to concatenate the breaks but it sorts the seq() in ascending order. Is there a way to workaround it? see scale_x_continuous below:

boxP <- ggplot(WFBox, aes(Week, FL,group=Week))
boxP + geom_boxplot(outlier.colour="pink",outlier.size=3,outlier.shape=21,fill="goldenrod",colour="blue") + scale_x_discrete(breaks=c(seq(27,51,2),seq(1,25,2)))

Felipe D. Carrillo  
Supervisory Fishery Biologist  
Department of the Interior  
US Fish & Wildlife Service  
California, USA




More information about the R-help mailing list