ligges@statistik.uni-dortmund.de
2002-Feb-08 13:27 UTC
[Rd] interaction.plot (with misplaced legend) (PR#1305)
Kaiya Liu wrote:> > Hi, > > I encountered a problem when I did interaction plots using the > interaction.plot() function. The labels for the trace factor appeared on > the plot when I did the plots in separate windows, but disappeared/cut off > when multiple plots were placed in one window. Can anybody help me?>From the example of ?interaction.plot:data(ToothGrowth) attach(ToothGrowth) interaction.plot(dose, supp, len, fixed=TRUE) # OK But the following looks quite ugly: par(mfrow=c(1,2)) interaction.plot(dose, supp, len, fixed=TRUE) interaction.plot(dose, supp, len, fixed=TRUE) par(mfrow=c(2,2)) interaction.plot(dose, supp, len, fixed=TRUE) There is not only a problem with the legend, also the magnification of the axis annotation is not homogeneous, because for the x-axis annotation mtext() is used. I'd suggest to change line 35: mtext(xlabs, 1, at = xvals) # old to axis(1, at = xvals, labels = xlabs, ...) # new Uwe Ligges ==============platform i386-pc-mingw32 arch x86 os Win32 system x86, Win32 status major 1 minor 4.1 year 2002 month 01 day 30 language R -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._