Hello!

In order to plot multiple graphs with the same setup I use the
following code-structure:

###########################################################
# storing old parameter set
oldpar <- par(no.readonly=T)

#copying old parameter set
newpar <- par(no.readonly=T)

#adjusting parameters
newpar <- par(mar=c(3.1,3.1,0.1,0.1),  # margin for figure area
             oma=c(0,0,0,0),          # margin for outer figure area
             cex.axis=0.9,          # font size axis
             mgp=c(2,0.6,0),          # distance of axis
             tck=0.02                # major ticks inside
             )

...
...
postscript(...)
par(newpar)
...
dev.off()
###########################################################

Calling the variable newpar delivers the old paramter set only (from
code-line "newpar <- par(no.readonly=T)"). If the code-segment "newpar
<- par(mar=..." runs a second time, the correct paramter set is
stored, however, just the 5 parameters adjusted and not the full list.

My question is, why must the code segment "newpar<-par(mar...)" run
twice? Is there a better way to handle the graphics output? I would be
grateful for a pointer on a FAQ-section or to an older discussion
thread in this group!

Thank you very much in advance!

Regards,
/steffen

--
Steffen Uhlig, PhD
Mechatronik und Sensortechnik
HTW des Saarlandes
Goebenstraße 40
66117 Saarbrücken

Tel.: +49 (0) 681 58 67 274

______________________________________________
R-help@r-project.org 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.

Reply via email to