Displaying 1 result from an estimated 1 matches for "polylo".
Did you mean:
pollo
2012 Feb 06
1
ggplot2 geom_polygon fill
...smalldummy = ddply(smalldummy, .(treatment), transform,
textpos = cumsum(rsfreq/sum(rsfreq)) -
rsfreq/sum(rsfreq)/2, # center within segment
lineposx = cumsum(rsfreq/sum(rsfreq)))
# segment borders without 0
# make the xs of the polygon
polylo = 1 + barwidth/2
polyhi = 2 - barwidth/2
xs = rep(c(polylo,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(...