search for: bigdummy

Displaying 1 result from an estimated 1 matches for "bigdummy".

Did you mean: bendummy
2012 Feb 06
1
ggplot2 geom_polygon fill
...ylo,polyhi,polyhi,polylo), 7) # make the ys of the polygon tmp1 = c(0, smalldummy$lineposx[1:7]) tmp2 = c(0, smalldummy$lineposx[8:14]) ys = c() for(i in 1:7) { nu = c(tmp1[i], tmp2[i], tmp2[i+1], tmp1[i+1]) ys = c(ys, nu) } m = as.factor(rep(0:6, each=4)) tmpdf = data.frame(xs, ys, mRS = m) bigdummy = merge(smalldummy, tmpdf, by = "mRS") ggplot(data = bigdummy, aes(x = treatment, y = rsfreq, fill = mRS)) + geom_bar(aes(width = barwidth),stat="identity",position="fill") + geom_text(aes(label=as.character(mRS), y = ifelse(rsfreq != 0, textpos, NA)), siz...