Jason Rupert
2009-Feb-04 19:21 UTC
[R] In qplot, is it possible to switch the location of axis_h and strip_h?
That is qplot, is it possible to switch the location of axis_h and strip_h? I produced a plot where I would like to have the strip_h on the bottom and the axis_h on the top of the facet plot. Is that possible? P.S. I figured out how to not show the x-axis ticks, while still showing the x-lablel. There is probably a better way, but here is what I found that seems to work: VADeaths_flat_df = stack(as.data.frame(VADeaths)) names(VADeaths_flat_df) = c('Data','Person') counts <- ddply(VADeaths_flat_df, .(cut(Data, breaks=fullseq(range(Data), 20)), Person), nrow) names(counts) <- c("bin", "person", "n") qplot(person, n, data = counts, fill = person, geom="bar", stat="identity", width = 0.9) + facet_grid(. ~ bin) + opts(axis.text.x = NULL) Thank you again for all your feedback. [[alternative HTML version deleted]]
hadley wickham
2009-Feb-04 19:32 UTC
[R] In qplot, is it possible to switch the location of axis_h and strip_h?
On Wed, Feb 4, 2009 at 1:21 PM, Jason Rupert <jasonkrupert at yahoo.com> wrote:> That is qplot, is it possible to switch the location of axis_h and strip_h? > > I produced a plot where I would like to have the strip_h on the bottom and the axis_h on the top of the facet plot. Is that possible?Not yet, but it's on my to do list. Hadley PS. You might want to join the ggplot2 mailing list, if you haven't already. -- http://had.co.nz/