[R] Equivalent of box() in grid graphics

p_connolly at slingshot.co.nz p_connolly at slingshot.co.nz
Thu Jan 17 01:19:05 CET 2013


Paul Murell's article "What's in a Name" in The R Journal Vol 4/2
gives an interesting example of editing a stacked barplot of the barley
data.  Using the method described in that article, it's easy to do
something along the lines of

grid.edit("plot_01.border.strip.1",
          grep=TRUE, global=TRUE,
          gp=gpar(col = "red"))

That changes more than I'd like to change. I'd like to change only the
bottom line of the rectangle.  How would I overwrite the unwanted red
lines along the lines of what box() would do with base graphics?

TIA
Patrick



More information about the R-help mailing list