Hello R friends, I get quite confused in using the grid graphic function grid.pack( ) and grid.frame ( ). Here is a simple example:
library(grid) grid.frame(name="frame1") grid.pack("frame1",rectGrob(width=unit(0.5,"npc"), height=unit(0.5,"npc"), gp=gpar(col="red"))) what I expect is a rectangle with half the default device's dimensions,but it returns a rectangle like 1/4 of the device.why? In addition wonder what the rectGrob is referred to if there are x.y arguments. Another question is I want to pack several barplots of different sizes in a row by average space,but the grid.pack just didn't work out, which gave me a layout that the the space between the midlines of each figure equals,not between their bounders. I have been working on this for a couple of days with more confusion. I hope someone can help me out. I will greatly appreciate it. ______________________________________________ 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.