G'day all,
I am not sure whether I should file this as a bug report, but I
thought that I should make the developers of R aware of the following
feature:
I have just installed R 2.0.0 and when I run "R CMD check" on the
source of some packages, I noticed that the XXX-examples.ps file
contains one page with two graphics overlaid. This seems to happen
when the first graphic is produced that uses the lattice() package.
I.e. as long as the examples use non-lattice graphics command, each
graphic is on its own page; the first graphic produced by a lattice
command (well, xyplot each time in the packages tested) is put on the
same page as the last graphic, after this, each graphic is again on a
page off its own regardless of whether it was produced by a lattice
graphics command or a non-lattice graphics command.
Cheers,
Berwin
--please do not edit the information below--
Version:
platform = i686-pc-linux-gnu
arch = i686
os = linux-gnu
system = i686, linux-gnu
status =
major = 2
minor = 0.0
year = 2004
month = 10
day = 04
language = R
Search Path:
.GlobalEnv, package:methods, package:stats, package:graphics,
package:grDevices, package:utils, package:datasets, Autoloads,
package:base
This is something Edzer Pebesma and I saw working on gstat and sp: Edzer Pebesma to CRAN 1 October: "WRT 2.0.0, I noted with gstat, and also with another package under development (sp for spatial classes) that when mixing traditional plots and lattice plots in the example sections, the lattice plot overplots the last traditional plot -- a newpage misses, so to speak. See gstat.Rcheck/gstat-Examples.ps" Roger On Thu, 7 Oct 2004, Berwin A Turlach wrote:> G'day all, > > I am not sure whether I should file this as a bug report, but I > thought that I should make the developers of R aware of the following > feature: > > I have just installed R 2.0.0 and when I run "R CMD check" on the > source of some packages, I noticed that the XXX-examples.ps file > contains one page with two graphics overlaid. This seems to happen > when the first graphic is produced that uses the lattice() package. > I.e. as long as the examples use non-lattice graphics command, each > graphic is on its own page; the first graphic produced by a lattice > command (well, xyplot each time in the packages tested) is put on the > same page as the last graphic, after this, each graphic is again on a > page off its own regardless of whether it was produced by a lattice > graphics command or a non-lattice graphics command. > > Cheers, > > Berwin > > --please do not edit the information below-- > > Version: > platform = i686-pc-linux-gnu > arch = i686 > os = linux-gnu > system = i686, linux-gnu > status = > major = 2 > minor = 0.0 > year = 2004 > month = 10 > day = 04 > language = R > > Search Path: > .GlobalEnv, package:methods, package:stats, package:graphics, > package:grDevices, package:utils, package:datasets, Autoloads, > package:base > > ______________________________________________ > R-devel@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >-- Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Breiviksveien 40, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93 e-mail: Roger.Bivand@nhh.no
On Thursday 07 October 2004 08:55, Berwin A Turlach wrote:> G'day all, > > I am not sure whether I should file this as a bug report, but I > thought that I should make the developers of R aware of the following > feature: > > I have just installed R 2.0.0 and when I run "R CMD check" on the > source of some packages, I noticed that the XXX-examples.ps file > contains one page with two graphics overlaid. This seems to happen > when the first graphic is produced that uses the lattice() package. > I.e. as long as the examples use non-lattice graphics command, each > graphic is on its own page; the first graphic produced by a lattice > command (well, xyplot each time in the packages tested) is put on the > same page as the last graphic, after this, each graphic is again on a > page off its own regardless of whether it was produced by a lattice > graphics command or a non-lattice graphics command.I can confirm this, e.g. with> postscript() > plot(1) > xyplot(2 ~ 2) > dev.off()(not that obvious on screen because the dark background overwrites the first plot). The underlying reason seems to be grid not knowing whether to start a new page the first time:> x11() > plot(1) > grid.newpage() > grid.points(x = runif(10), y = runif(10), vp = viewport())Paul, any ideas? Deepayan
Deepayan, and others: Paul already fixed this; he sent me this in an email on 10/04/04: Kurt Hornik passed on to me your email about mixing traditional and lattice graphics. The problem is in the grid package and should be fixed for 2.0.1, but for 2.0.0 the only solution is to make an extra call to grid.newpage() before the first lattice call (if there has been previous traditional graphics output). Paul also noted that it will probably mostly come up there (in testing output). Regards, -- Edzer
Seemingly Similar Threads
- [R-sig-Geo] plot() and Jpeg() increase font size and resolution
- default value for cutoff in gstat variogram()
- Are package maintainers responsible for name-mangling class names?
- Lattice: no grid name space
- how to convert source code in windows package for linux (ubuntu)