Patrick Bennett
2004-Jun-18 00:37 UTC
[R] can't get text to appear over individual panels in multi-panel plot
I'm trying to learn how to create Trellis multi-panel plots, but I'm having some trouble reproducing the graphs shown in Venables & Ripley (2002) (e.g., Figs 4.14 & 4.15). Actually, everything looks fine except for the fact that I can't see any text above the individual panels. I'm using R 1.9.0 for OS-X running on Mac OSX 10.3.3, and I'm drawing the graphs into the Quartz device. Sorry for bothering the list with what is probably a trivial question, but I've run out of ideas... Any help would be appreciated. Cheers, pjb Patrick J. Bennett, Ph.D. Professor & Canada Research Chair Department of Psychology McMaster University 1280 Main St. West Hamilton, ON L8S 4K1 Canada Office: 905-525-9140 ext. 23012 FAX: 905-529-6225 URL: www.psychology.mcmaster.ca/bennett/ www.chairs.gc.ca "I understand small business growth. I was one." -- George W. Bush, President of the United States of America
Deepayan Sarkar
2004-Jun-18 00:59 UTC
[R] can't get text to appear over individual panels in multi-panel plot
On Thursday 17 June 2004 19:37, Patrick Bennett wrote:> I'm trying to learn how to create Trellis multi-panel plots, but I'm > having some trouble reproducing the graphs shown in Venables & Ripley > (2002) (e.g., Figs 4.14 & 4.15). Actually, everything looks fine > except for the fact that I can't see any text above the individual > panels. > > I'm using R 1.9.0 for OS-X running on Mac OSX 10.3.3, and I'm drawing > the graphs into the Quartz device. > > Sorry for bothering the list with what is probably a trivial > question, but I've run out of ideas... > > Any help would be appreciated.I don't have that edition, and it's difficult to guess without code, but have you looked at the scripts that come with the MASS package ? They are supposed to reproduce the analysis done in the book (I'm assuming that the book you are referring to is in fact MASS). It might be as simple as replacing text() calls by ltext(). Deepayan
Deepayan Sarkar
2004-Jun-18 05:26 UTC
[R] can't get text to appear over individual panels in multi-panel plot
On Thursday 17 June 2004 22:57, Patrick Bennett wrote:> yes, i can reproduce that same graph when i print to the pdf-device. > but the panel titles do not appear when I print to the Quartz-device.Hmm. I won't be able to help you then, let's hope someone else can. Deepayan> On Jun 17, 2004, at 11:47 PM, Deepayan Sarkar wrote: > > On Thursday 17 June 2004 22:24, Patrick Bennett wrote: > >> I neglected to say that I am using the R-Aqua interface and the > >> MASS, grid, & lattice packages. > >> > >> Here is one specific example where I'm having trouble. > >> > >> After loading the crabs data set, I create the figure with the > >> following code (which is taken from MASS): > >> > >> lcrabs.pc<-predict(princomp(log(crabs[,4:8]))) > >> sex<-crabs$sex;levels(sex)<-c("Female","Male") > >> sp<-crabs$sp;levels(sp)<-c("Blue","Orange") > >> splom(~lcrabs.pc[,1:3] | sp*sex,cex=0.5,pscales=0) > >> > >> The figure is plotted in the Quartz window: everything looks OK > >> except for the lack of text above the individual panels. > > > > Here's what I get (on a pdf device), and it looks OK to me. > > > > http://www.stat.wisc.edu/~deepayan/R/crabs.pdf > > > > If this is not what you see, then there might be a problem with > > your device driver. > > > > Deepayan