Hello, I want to place two plots on top of each other. However, the problem is that I can't figure out a simple way to align them correctly. Is there a way to specify this? Since the data is bunch of coordinates and the second layer is an outline of a map (a .ps file I import using the grImport package), I suppose one option would be to specify a set of "artificial" coordinates that make up the very corners of that plot, and then have the second layer will this same space. Any ideas how to do this? //John
Greg Snow
2009-Dec-30 17:55 UTC
[R] Positioning plots on top of each other (aligment & borders)
Look at the subplot function in the TeachingDemos package, it may do what you want. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Jay > Sent: Wednesday, December 30, 2009 2:32 AM > To: r-help at r-project.org > Subject: [R] Positioning plots on top of each other (aligment & > borders) > > Hello, > > I want to place two plots on top of each other. However, the problem > is that I can't figure out a simple way to align them correctly. Is > there a way to specify this? > Since the data is bunch of coordinates and the second layer is an > outline of a map (a .ps file I import using the grImport package), I > suppose one option would be to specify a set of "artificial" > coordinates that make up the very corners of that plot, and then have > the second layer will this same space. Any ideas how to do this? > > > //John > > ______________________________________________ > R-help at 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.
Jim Lemon
2009-Dec-30 23:02 UTC
[R] Positioning plots on top of each other (aligment & borders)
On 12/30/2009 08:32 PM, Jay wrote:> Hello, > > I want to place two plots on top of each other. However, the problem > is that I can't figure out a simple way to align them correctly. Is > there a way to specify this? > Since the data is bunch of coordinates and the second layer is an > outline of a map (a .ps file I import using the grImport package), I > suppose one option would be to specify a set of "artificial" > coordinates that make up the very corners of that plot, and then have > the second layer will this same space. Any ideas how to do this? > > >Hi John, I may be mistaken, but wouldn't it be easier to overlay your points on a map generated by the maps package? Your user units would then correspond to your coordinates. Jim