Some questions about plotting with R
Hi
Thanks for the response Robin, but that document doesn't help me with either my quest for plot3, or multiple figures (i.e. the 'figure' command in Octave/Matlab). cheers, Wee-Jin
If you want three separate graphics windows (Devices) then,
X11() # not really needed as plot() will produce a new device if
none is
# open
plot(1:10)
X11()
plot(1:10)
X11()
plot(1:10)
This isn't in R-and-octave.txt: I'll add it when I get a minute. And come to think of it, R-and-octave.txt doesn't mention plot3, probably because it's not implemented in octave AFAIR. I'll add a section of 3D graphics, When I Get A Minute (tm). You also have p3d() of the "onion" package for 3D plotting, which you might find closer in spirit to the matlab functionality. best wishes rksh
... Will create a new device. see ?Devices for a list of devices you can open on your system or ?capabilities . It is so long since I used a Windows version of R, that I forget if X11() opens a Windows graphics device there as well. As for 3D stuff, you might take a look at persp() (in base R) and the scatterplot3D package. If you want to see what R's Graphics can do, then the book R Graphics by Paul Murrell [1] will tell you all you need to know, and the excellent, online R graphics gallery [2] has lots of examples.
-- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743