[R] How to suppress factor labels
Ista Zahn
izahn at psych.rochester.edu
Wed Jun 8 21:31:51 CEST 2011
Hi Jim,
See ?scale_x_discrete
Best,
Ista
On Wed, Jun 8, 2011 at 3:26 PM, James Rome <jamesrome at gmail.com> wrote:
> I am using ggplot2 to make a boxplot that overlays a scatterplot:
> pp = qplot(time, error, data=times, size=I(1), geom="jitter", main=title,
> ylab="Error (min)", xlab="Time before ON (min)", alpha=I(1/10),
> color=times$runway,
> ylim=c(-30,40))
> pp2 = pp + with(times, facet_wrap(~ runway, ncol=2))
> print(pp2 + geom_boxplot(alpha=.5, color="blue",
> outlier.colour="green", outlier.size=1))
> The x variable is a factor for every minute from 0:60. My problem is
> that ggplot2 labels every factor value on the x axis, and they overlap.
> How can I make ggplot2 label only, say every 5th factor value on the x axis?
>
> Thanks,
> Jim
>
> ______________________________________________
> 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.
>
--
Ista Zahn
Graduate student
University of Rochester
Department of Clinical and Social Psychology
http://yourpsyche.org
More information about the R-help
mailing list