[R] Conflict plot.circular and layout() using different column width of the layout matrix

Daniela Buesser daniela.buesser at gmx.ch
Wed Apr 14 18:32:21 CEST 2010


Hi

I am trying to make a figure with several subfigure using the layout(). The subfigures include circular plots (package:circular). When I use different widths of the columns (layout(matrix(1:6, 2,3), width=c(1,1.5,1))) the circular plots in the first row have an elliptic and unpredictible shape but are normal in the second row. When the widths of the columns are equal the problem does not occur. The same problems occurs when the heights of the subfigure rows are different. Is this a bug? Any suggestions how to solve the problem? Below is an example to outline the problem.
Many thanks,
Daniela

library(circular)
layout(matrix(1:6, 2,3), width=c(1,1.5,1))
layout.show(6)
angles <- circular(pi)
plot(angles, stack=T, bins=360, col="green", xlim=c(-1,1), ylim=c(-1,1))
plot(angles, stack=T, bins=360, col="green", xlim=c(-1,1), ylim=c(-1,1))
plot(angles, stack=T, bins=360, col="green", xlim=c(-1,1), ylim=c(-1,1))
plot(angles, stack=T, bins=360, col="green", xlim=c(-1,1), ylim=c(-1,1))
plot(angles, stack=T, bins=360, col="green", xlim=c(-1,1), ylim=c(-1,1))
plot(angles, stack=T, bins=360, col="green", xlim=c(-1,1), ylim=c(-1,1))

Without different column widths there it works fine.
library(circular)
layout(matrix(1:6, 2,3))
layout.show(6)
angles <- circular(pi)
plot(angles, stack=T, bins=360, col="green", xlim=c(-1,1), ylim=c(-1,1))
plot(angles, stack=T, bins=360, col="green", xlim=c(-1,1), ylim=c(-1,1))
plot(angles, stack=T, bins=360, col="green", xlim=c(-1,1), ylim=c(-1,1))
plot(angles, stack=T, bins=360, col="green", xlim=c(-1,1), ylim=c(-1,1))
plot(angles, stack=T, bins=360, col="green", xlim=c(-1,1), ylim=c(-1,1))
plot(angles, stack=T, bins=360, col="green", xlim=c(-1,1), ylim=c(-1,1))





-- 
Sicherer, schneller und einfacher. Die aktuellen Internet-Browser -
jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/chbrowser



More information about the R-help mailing list