Hi,
I have the follow ggplot2 code I am running:

ggplot(data=bb.res.math,aes(x=factor(id.bb),y=bb.math.comb,fill=BB)) + 
geom_bar() + facet_grid(BB~.) + scale_fill_brewer(pal="Set1") + ylab("Average 
Student Residual (Math)") + xlab("Student ID")

The number of unique id.bb is 2207 and so my X-axis has a couple of thousands, 
indistinguishable tick marks that correspond to each id. I am wondering if 
there is a way to suppress these tick marks?

Here is some test data:

> test
  id.bb bb.res.m bb.math.comb BB
1  2900        1   -3.0032235 BB
2  2904        1   -1.8758770 BB
3  3469        1    0.8182852 BB
4  4213        1   -2.0660215 Not BB
5  4215        1   -4.8622086 BB
6  4395        1    0.8873996 Not BB

> ggplot(data=test,aes(x=factor(id.bb),y=bb.math.comb,fill=BB)) + geom_bar() + 
> facet_grid(BB~.) + scale_fill_brewer(pal="Set1") + ylab("Average Student 
> Residual (Math)") + xlab("Student ID")


Gives the following graph:

http://dl.dropbox.com/u/1501309/ggplot2_suppress_ids.pdf

I'd like to prevent "2900", "2904", "3469", etc. from showing up on the X-axis.

Thanks,
Chris
        [[alternative HTML version deleted]]

______________________________________________
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