superpose.polygon, panel.polygon and their colors
djmuseR wrote:
Hi Dieter:
I think the OP wanted both lines and shading; from your code I could get
the
shading but not the lines. This is what it took for me to get the lines
(note the type and col.line changes in xyplot() ):
xyplot(est ~ x | cond, group = grp, data = data, type = 'r',
col = 'gray80', col.line = c('red', 'blue'),
upper = data$upper,
lower = data$lower,
panel = function(x, y, ...){
panel.superpose(x, y, panel.groups = 'panel.bands',...)
panel.xyplot(x, y, ...)
})
But this creates a new problem...the lines extend farther than the bands.
You are right. And use type="l" instead of r to truncate the lines to the boxes. Dieter
View this message in context: http://r.789695.n4.nabble.com/superpose-polygon-panel-polygon-and-their-colors-tp3002374p3003504.html Sent from the R help mailing list archive at Nabble.com.