Re: [R] Viewport and grid.draw
Deepayan Sarkar deepayan.sarkar at gmail.com writes: Try looking at the first example in http://dsarkar.fhcrc.org/lattice/book/Chapter12-Interaction/edited.R for inspiration. May I suggest to use http://dsarkar.fhcrc.org/lattice/book/figures.html instead. Nice. Dieter __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Viewport and grid.draw
On 12/10/07, Dieter Menne [EMAIL PROTECTED] wrote: Deepayan Sarkar deepayan.sarkar at gmail.com writes: Try looking at the first example in http://dsarkar.fhcrc.org/lattice/book/Chapter12-Interaction/edited.R for inspiration. May I suggest to use http://dsarkar.fhcrc.org/lattice/book/figures.html instead. Nice. I don't think you can access Ch 12 code from that (those plots are by nature not scriptable, and I haven't done the extra work to make the code available anyway). -Deepayan __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Viewport and grid.draw
Hi Deepayan and everyone, I need to add a common legend to a group of latice graphs, I have tried different ways using viewport and grid.draw without success. Here is what I have: plot.new() library(grid) library('IDPmisc') print(plot1, split=c(1,1,2,4), more=TRUE) print(plot4, split=c(2,1,2,4), more=TRUE) print(plot2, split=c(1,2,2,4), more=TRUE) print(plot5, split=c(2,2,2,4), more=TRUE) print(plot3, split=c(1,3,2,4), more=TRUE) print(plot6, split=c(1,4,1,4), more=FALSE) grid.text(vp=do.call(viewport,grid.locator(unit=npc)), label='A', gp=gpar(fontsize=20)) grid.text(vp=do.call(viewport,grid.locator(unit=npc)), label='B', gp=gpar(fontsize=20)) key1-draw.leg(key=list(text=list(c('some text', 'text2')),points=list(pch=c(17,15 vp.key-viewport(grid.locator(unit=npc)) pushViewport(vp.key) grid.draw(key1) grid.locator cannot be one of the arguments of viewport, but waht would be the analog of this argument in viewport then? Thank you, Judith Be a better friend, newshound, and __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Viewport and grid.draw
On Dec 9, 2007 6:58 PM, Judith Flores [EMAIL PROTECTED] wrote: Hi Deepayan and everyone, I need to add a common legend to a group of latice graphs, I have tried different ways using viewport and grid.draw without success. Try looking at the first example in http://dsarkar.fhcrc.org/lattice/book/Chapter12-Interaction/edited.R for inspiration. -Deepayan Here is what I have: plot.new() library(grid) library('IDPmisc') print(plot1, split=c(1,1,2,4), more=TRUE) print(plot4, split=c(2,1,2,4), more=TRUE) print(plot2, split=c(1,2,2,4), more=TRUE) print(plot5, split=c(2,2,2,4), more=TRUE) print(plot3, split=c(1,3,2,4), more=TRUE) print(plot6, split=c(1,4,1,4), more=FALSE) grid.text(vp=do.call(viewport,grid.locator(unit=npc)), label='A', gp=gpar(fontsize=20)) grid.text(vp=do.call(viewport,grid.locator(unit=npc)), label='B', gp=gpar(fontsize=20)) key1-draw.leg(key=list(text=list(c('some text', 'text2')),points=list(pch=c(17,15 vp.key-viewport(grid.locator(unit=npc)) pushViewport(vp.key) grid.draw(key1) grid.locator cannot be one of the arguments of viewport, but waht would be the analog of this argument in viewport then? Thank you, Judith Be a better friend, newshound, and __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.