我很抱歉这个非信息性的标题。
> y=read.csv(textConnection(scan("",sep="\n",what="raw")))
"","org","art","type","length"
"191","gk","Finish","short",4
"147","ik","Attending","short",7
"175","gl","Finish","long",11
"192","il","Attending","long",95
"144","gm","Finish","between",5
"161","im","Attending","between",15
"164","tu","Something","young",8
"190","tv","Something","old",4
> decompress=function(x)x[rep(1:nrow(x),x$length),-ncol(x)]
> exstatus=decompress(y)
然后情节
ggplot(exstatus, aes(x=type, fill=art))+
geom_bar(aes(y=..count../sum(..count..)),position="dodge")
问题是最右边的两个条(“年轻”、“老”)太厚了——“某物”占据了整个宽度——这不是我想要的。
替代文字 http://www.imagechicken.com/uploads/1272295176088679800.png
很抱歉,我无法更好地解释它。