Hi, I want to produce two parallel rotated strips with color gradient. So far, the sample strip is something produced by this:
pushViewport(viewport(x = unit(0.638, "npc"), y =unit(0.386, "npc"), width=.62, height=0.006, angle=137.2)) grid.rect(y=100:1/100, just="top", gp=gpar(col=NA, fill=colorRampPalette(c("lightgray", "white"), space="Lab")(200))) I want a same one parallel to it to the right. I've tried something like: pushViewport(viewport(x = unit(c(0.638, 0.648), "npc"), y =unit(c(0.386, 0.386), "npc"), width=unit(c(.62, .62) , "npc"), height=unit(c(0.006, 0.006), "npc"), angle=137.2, layout =grid.layout(1,2))) grid.rect(y=100:1/100, just="top", gp=gpar(col=NA, fill=colorRampPalette(c("lightgray", "white"), space="Lab")(200))) grid.rect(y=100:1/100, just="top", gp=gpar(col=NA, fill=colorRampPalette(c("lightgray", "white"), space="Lab")(200))) Or vpList(pushViewport(viewport(x = 0.638, y = 0.386, width=.62, height=0.006, angle=137.2))) grid.rect(y=100:1/100, just="top", gp=gpar(col=NA, fill=colorRampPalette(c("lightgray", "white"), space="Lab")(200))) But kept getting error messages. Would someone please give me some hint? Thank you very much!! Kexin [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.