[R] (Newbie) using par() to regulate viewing area in graphs

Kaspar Pflugshaupt pflugshaupt at geobot.umnw.ethz.ch
Thu Sep 28 14:25:23 CEST 2000

On 28.9.2000 10:49 Uhr, Norberto Eiji Nawa wrote:

> Hello:
> I should first apologize for the very basic question, but I ought to
> start from somewhere [embarrassed grin].

No reason to be embarrassed, most of us started asking questions like this.
I still do.

> I am using R-1.0.0 in a Windows 98 machine to plot some graphs. I
> tried to apply a "zoom in" in some portions of the graph using say
> 'par(yaxp=c(0.35,0.40,5))' but nothing happens, no error msg, no
> update in the active graphics device. What should be the procedure to
> "zoom in" in a graph?

AFAIK, this is not possible, since the axis ranges are saved with the plot
and can't be changed afterwards. You'll have to change the settings and redo
the graph. If it's a complicated graph, you should pack the commands into a
small function. It's more convenient.

If you upgrade to R 1.11 (which I'd do anyway), you can save a plot to a
variable and recall it later (although not with different settings). Still,
you can then easily compare several versions.

Have fun



Kaspar Pflugshaupt
Geobotanisches Institut
Zuerichbergstr. 38
CH-8044 Zuerich

Tel. ++41 1 632 43 19
Fax  ++41 1 632 12 15

mailto:pflugshaupt at geobot.umnw.ethz.ch
privat:pflugshaupt at mails.ch

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list