Ggplot 0.9.3 question with facet_wrap, free scales and coord_flip

This simple code from the demo example no longer works in 0.9.3.

require(ggplot2) p <- qplot(displ, hwy, data = mpg) p + facet_wrap(~ cyl, scales = "free_y") + coord_flip() 

An error appears in the above code:

 Error in facet_render.wrap(plot$facet, panel, plot$coordinates, plot_theme(plot), : ggplot2 does not currently support free scales with a non-cartesian coord or coord_flip. 

What are some workarounds for getting something like this. Thanks!

==================================================== ==== Second attempt

Finally, I came to the creation of a small example. Here is the playback method:

dataset: d.csv:

 "Priority","Owner","Project" "Medium","owner7","Team4" "Medium","owner1","Team1" "Low","","Team3" "High","owner6","Team3" "Medium","","Team4" "Medium","owner3","Team1" "Medium","owner2","Team1" "Medium","owner5","Team2" "Low","owner4","Team2" "Critical","","Team2" "Medium","owner2","Team1" "High","","Team4" 

the code:

 data <- read.csv(file="d.csv",head=TRUE) attach(data) p3 <- ggplot(data,aes(x=Owner,fill=Priority))+ geom_bar(aes(y=..count..)) + facet_wrap(~ Project, nrow=2, scales="free") + opts(legend.position="none") 

This creates a faceted plot, but I need axes. Previously, adding the function coord_flip () did the trick, but now the new ggplot does not allow the use of free scales and Coord_flip together. Is there any other way to rotate the axes of a facet? Free scales are important to me. Thanks for any pointers.

+7
source share

All Articles