Displaying 1 result from an estimated 1 matches for "lineposx".
Did you mean:
linepos
2012 Feb 06
1
ggplot2 geom_polygon fill
...(0:6,2)),
rsfreq = sample(0:6,14,replace=T),
treatment = factor(rep(c("one","two"),each=7))
)
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$line...