Skip to content
Prev 308636 / 398506 Next

Axis Breaks with ggplot2

Not in ggplot2 as far as I know. As Jim Lemon says the plotrix package should handle this.  

An alternative that probably gives better data interpretation might be to use facet.grid() or perhaps facet_wrap() in ggplot2. 

Crude example

library(ggplot2) 
xx  <-  data.frame(aa = c(10, 12, 15, 55, 65), cc  <-  1:5,  bb  = c("a","a","a","b","b"))
str(xx)

gbar <- ggplot(xx, aes(cc, aa, fill= cc)) + geom_bar(stat="identity") 
gbar + facet_grid(bb ~ .)

John Kane
Kingston ON Canada
____________________________________________________________
GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at http://www.inbox.com/smileys
Works with AIM?, MSN? Messenger, Yahoo!? Messenger, ICQ?, Google Talk? and most webmails