[R] How to use the function "plot" as Matlab
Robin Hankin
r.hankin at noc.soton.ac.uk
Wed Jul 13 12:50:34 CEST 2005
On 13 Jul 2005, at 11:01, (Ted Harding) wrote:
> On 13-Jul-05 Prof Brian Ripley wrote:
>
>> For most purposes it is easiest to use matplot() to plot superimposed
>> plots like this. E.g.
>>
>> x <- 0.1*(0:20)
>> matplot(x, cbind(sin(x), cos(x)), "pl", pch=1)
>>
>
> This, and Robin's suggestion, are good practical solutions especially
> when only a few graphs (2 or 3 or ... ) are involved. However, their
> undelying principle is to accumulate auxiliary variables encapsulating
> the graphs which will eventually be plotted.
Ted makes a good point here. I would find this quite useful, for EDA
(exploratory
data analysis) work, where one often needs to add new lines to a
plot, one at a
time, in an ad hoc manner, just to "see what happens".
Would adding such functionality (perhaps via a new Boolean argument
to plot(),
"rescaling", defaulting to FALSE, that enabled dynamic rescaling when
plot(...,add=TRUE) is
executed) require quite a lot of low-level work?
best wishes
Robin
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
More information about the R-help
mailing list