Hi everyone,
I'm hoping you can give me some pointers. I have a requirement to draw
multiple (103) xy line plots onto one output device. Ideally the plots
should be displayed in a hexagonal grid (example at
www.maladmin.com/example.jpg). I can calculate the locations for each
waveform but am wondering how to create multiple plotting areas. I have
come accross references to a package grid (which doesn't seem to be in
my CRAN mirror probability.ca) and lattice but I'm not sure if I'm on
the correct lines.
Any advice gratefully received.
Thanks
Tom
--
--Tom Wright
____________________________________________
| Contact me: |
| Skype: 0121 288 0756 tomwright01) |
| MSN: passport at macrobot.net |
| Jabber: maladmin at xim.ca |
| ICQ: 423913453 |
|___________________________________________|
Ever since prehistoric times, wise men have tried to understand what,
exactly, make people laugh. That's why they were called "wise
men."
All the other prehistoric people were out puncturing each other with
spears, and the wise men were back in the cave saying: "How about:
Would you please take my wife? No. How about: Here is my wife, please
take her right now. No How about: Would you like to take something?
My wife is available. No. How about ..."
-- Dave Barry, "Why Humor is Funny"
On 9/5/07, Tom Wright <tom at maladmin.com> wrote:> Hi everyone, > I'm hoping you can give me some pointers. I have a requirement to draw > multiple (103) xy line plots onto one output device. Ideally the plots > should be displayed in a hexagonal grid (example at > www.maladmin.com/example.jpg). I can calculate the locations for each > waveform but am wondering how to create multiple plotting areas. I have > come accross references to a package grid (which doesn't seem to be in > my CRAN mirror probability.ca) and lattice but I'm not sure if I'm on > the correct lines. > Any advice gratefully received.grid seems like the right choice to me (it comes bundled with R, so it's not available as a separate package). Here's an example that may give you a few hints: library(grid) grid.newpage() for (i in 1:30) grid.lines(x = 0:20/21, y = sin(70 * runif(1) * 0:20/21), vp = viewport(x = runif(1), y = runif(1), height 0.05, width = 0.05)) See the package documentation, or Paul Murrell's book "R Graphics" for more. -Deepayan
Take a look at the my.symbols function in the TeachingDemos package. The last example shows how to create a hexagonal grid and the 2nd to last example shows how to plot several small line plots onto a larger plot. Combining these 2 examples should give you what you want. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at intermountainmail.org (801) 408-8111> -----Original Message----- > From: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Tom Wright > Sent: Wednesday, September 05, 2007 8:54 AM > To: r-help at stat.math.ethz.ch > Subject: [R] Multiple xyplots > > Hi everyone, > I'm hoping you can give me some pointers. I have a > requirement to draw multiple (103) xy line plots onto one > output device. Ideally the plots should be displayed in a > hexagonal grid (example at www.maladmin.com/example.jpg). I > can calculate the locations for each waveform but am > wondering how to create multiple plotting areas. I have come > accross references to a package grid (which doesn't seem to > be in my CRAN mirror probability.ca) and lattice but I'm not > sure if I'm on the correct lines. > Any advice gratefully received. > Thanks > Tom > > -- > --Tom Wright > ____________________________________________ > | Contact me: | > | Skype: 0121 288 0756 tomwright01) | > | MSN: passport at macrobot.net | > | Jabber: maladmin at xim.ca | > | ICQ: 423913453 | > |___________________________________________| > > > Ever since prehistoric times, wise men have tried to > understand what, exactly, make people laugh. That's why they > were called "wise men." > All the other prehistoric people were out puncturing each > other with spears, and the wise men were back in the cave > saying: "How about: > Would you please take my wife? No. How about: Here is my > wife, please take her right now. No How about: Would you > like to take something? > My wife is available. No. How about ..." > -- Dave Barry, "Why Humor is Funny" > > ______________________________________________ > R-help at stat.math.ethz.ch 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. >