[R] Graphics: calling par(mar) after frame()

From: Brahm, David <David.Brahm_at_geodecapital.com>
Date: Thu 07 Jul 2005 - 06:20:51 EST


The following code produces 6 plots on a page, but the first is distorted and different from the others:

par(mfrow=c(3,2), las=2)
for (i in 1:6) {
  frame()
  par(mar=c(7, 7, 1, 1))

  axis(2); box(); abline(h=seq(0,1,.5), col=2:4) }

The first plot's axes are mis-aligned with the plotting area implied by the box. It seems to be a result of calling par(mar) after frame(). Is this expected behavior, or some kind of bug?

I'm using R-2.1.0 on Linux with X11; I see the same behavior in Windows.


R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jul 07 06:25:22 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:18 EST