[R] help with graphics

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Aug 4 11:34:48 CEST 2003


On Sun, 3 Aug 2003, Andrew C. Ward wrote:

> Did you have a "dev.off()" somewhere after barchart?
> Otherwise you never know what you might get in the png file.

dev.print() copies the current device, so using dev.off() would be wrong
(device no longer current).

See ?Lattice for why print(barchart(...)) is needed here.

> Quoting Erwan BARRET <erwan.barret at wanadoo.fr>:
> 
> > I'd like to use lattice to make graphics under
> > conditional structure like : 
> > if (TRUE) { barchart(....)
> > dev.print(png, file = "image1.png", width = 600)
> > }
> > but there's nothing in the output file. It seems that
> > it's too long to print graphic into the graphical output
> > and the saved file is a blank picture.
> > it works if I do that without the conditionnal
> > structure.
> > it doesn't work if I source a batch file
> > can you help me?
> > 
> > I'm using R1.6.2 under win98
> > Thanks
> > 	[[alternative HTML version deleted]]
> > 
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> >
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list