Mark Knecht
2009-Jul-27 18:42 UTC
[R] skip plot/blank plot on purpose (multi-plot question)
Hi, Say that I've got a function that has the following code in it: X11(width=10, height=10) layout(rbind(c(1,1,1,2,2,2), c(3,4,5,6,7,8), c(9,10,11,12,13,14)), height=c(3,1,1)) layout.show(14) Sometimes when I call this function it will turn out by design that one or more of the data sets that I use to create the plots in positions 3-14 are empty. As there is a day of the week relationship between 3-8 and 9-14, and say that 12 is an empty set, how can I skip 12, leave it blank or make it blank, and then make the next data set plot in position 13? 1) Is there some generic way to call plot and have it plot, but it plots nothing so I don't see anything at all in position 12? This could be a blank plot function I call when I notice the data set is empty. 2) Is there some generic way to specify the position number I want the next plot to use so that I'd not plot 12 but would specify 13? Thanks, Mark
Bert Gunter
2009-Jul-27 19:21 UTC
[R] skip plot/blank plot on purpose (multi-plot question)
Well, all of this can be done quite nicely with lattice graphics: ?xyplot (See, e.g. the "skip" argument) 1) Is there some generic way to call plot and have it plot, but it plots nothing so I don't see anything at all in position 12? This could be a blank plot function I call when I notice the data set is empty. -- But if you do not wish to learn lattice, please at least read the docs on standard graphics: ?plot (the type argument) ?plot.default (the axes argument) -- Bert Gunter Genentech, Inc. 2) Is there some generic way to specify the position number I want the next plot to use so that I'd not plot 12 but would specify 13? Thanks, Mark ______________________________________________ R-help at 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.
Also look at the frame and plot.new functions. -----Original Message----- From: "Mark Knecht" <markknecht at gmail.com> To: "Bert Gunter" <gunter.berton at gene.com> Cc: "r-help" <r-help at r-project.org> Sent: 7/27/09 1:56 PM Subject: Re: [R] skip plot/blank plot on purpose (multi-plot question) On Mon, Jul 27, 2009 at 12:21 PM, Bert Gunter<gunter.berton at gene.com> wrote:> Well, all of this can be done quite nicely with lattice graphics: ?xyplot > (See, e.g. the "skip" argument) > > > 1) Is there some generic way to call plot and have it plot, but it > plots nothing so I don't see anything at all in position 12? This > could be a blank plot function I call when I notice the data set is > empty. > > -- But if you do not wish to learn lattice, please at least read the docs on > standard graphics: ?plot (the type argument) ?plot.default (the axes > argument)Thank you. It was the ?plot.default/axis argument that I was looking for. I knew type="n". Cheers, Mark> > -- Bert Gunter > Genentech, Inc. > > 2) Is there some generic way to specify the position number I want the > next plot to use so that I'd not plot 12 but would specify 13? > > Thanks, > Mark > > ______________________________________________ > R-help at 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 at 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.