Skip to content

plotting questions

5 messages · oliver, Simon Pickett, David Winsemius +1 more

#
hi,

There are two types of plotting I miss dearly in Matlab, can anyone
enlighten me how to do similar stuff in R?

- multiple figures with individual windows (not multiple figures in
same window)?

- draw something, hold on the drawing, wait for a key action, then
overlay on top?

Not sure if this makes sense, just want to check if there are
developed techniques for them.

Thanks

Oliver
#
Hi Oliver,

1) thats easy, if you want to display several graphs at once type windows(), 
once for each new graph.

2) Not sure exactly what you mean here but you have complete control over 
graphs in R. e.g. plot a blank graph then add axex using axis(), add points 
using points(), etc. etc.

Check out these pdfs http://cran.r-project.org/other-docs.html particularly 
Emanuel Paradis's great intro to using R, very helpful for plots.

Hope this helps,

Si.


----- Original Message ----- 
From: "Oliver" <fwang2 at gmail.com>
To: <r-help at r-project.org>
Sent: Friday, February 20, 2009 3:33 AM
Subject: [R] plotting questions
#
On Feb 20, 2009, at 4:53 AM, Simon Pickett wrote:

            
True, we to guess. My guess is that he wants:
ask {gtools}
R Documentation
Display a prompt and collect the user's responseDescription
Display a prompt and collect the user's response

Usage
ask(msg = "Press <RETURN> to continue: ")
So one plot would be sent to a graphics device, then ask(), then after  
response, add a line or points or ... (but not a new plot() or  
dev.new() command)

?dev.cur
?abline
?points
#
The dev.new function starts the default graphics device for that platform, so is the device independent method for doing this.  Individual users can change the default using options().

Hope this helps,