曾经完美运行的旧代码不再适用于 0.9.3。该问题与刻面、自由音阶和坐标翻转的使用有关。
这是一种重现的方法:
数据集: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"
代码:
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")
这会创建一个多面图,但我需要翻转轴。以前,添加 coord_flip() 可以解决问题,但现在新的 ggplot 不允许同时使用自由比例和 coord_flip。有没有其他方法可以转动刻面轴?自由秤对我很重要。感谢您的任何指示。