[R] mfrow is ignored by some plots

Jim Lemon jim at bitwrit.com.au
Thu Jul 19 12:01:16 CEST 2007


Hi all,
I was just informed that the plots in the radial.plot family in the 
plotrix package do not plot correctly when using mfrow or mfcol to 
subdivide the plot window. I found one related message, an answer from 
Deepayan Sarkar to a question about lattice graphics, but that shed no 
light on this problem.

If I invoke par(mfrow=c(2,2)) and run radial.plot a few times, the plots 
appears in the upper left corner. _Sometimes_ the second plot appears in 
the upper right corner once, but then returns to the upper left. If I 
invoke par(new=TRUE), the plots appear in the lower right corner.

For instance, the following just keeps writing the plots in the upper left.

par(mfrow=c(2,2))
radial.plot(rnorm(7),0:6,line.col="red",lwd=2)
radial.plot(rnorm(7),0:6,line.col="red",lwd=2)
radial.plot(rnorm(7),0:6,line.col="red",lwd=2)
radial.plot(rnorm(7),0:6,line.col="red",lwd=2)

If I then enter:

par(new=TRUE)

and repeat the plots, they all accumulate in the lower right. I think 
this may have something to do with the calls to points or lines or 
symbols within radial.plot, but I could find no information on this in 
the help for plot, par, or several other pages.

Any clues?

Jim



More information about the R-help mailing list