[R] is win.print() broken or am I doing something wrong?

Thomas Lumley thomas at biostat.washington.edu
Mon Aug 28 19:14:47 CEST 2000


On Mon, 28 Aug 2000 Dominic_Barraclough at urmc.rochester.edu wrote:

> I am trying to print a graph
> 
> > plot(y=atestplot$b,x=atestplot$a, type="s")
> > win.print()
> 
> This leads to a windows print dialog box- that diappears when i hit 
> print. subquently  i find  a 
> "GraphAppJob" of zero size in the print queue- this just sits until I 
> enter 
> dev.off()
> at which point a blank sheet is printed
> Is it me or is this a bug?

It's you :).  win.print() does not print the current plot. It creates a
new plot on a windows printer. So when you do win.print() nothing happens
until you plot something and close the device. Then it prints whatever you
plotted (in your case, nothing).

I think you are looking for dev.print/dev.copy.

> 
> Incidentally if i just select the print button when the plot is selected 
> immediately after producing the plot it prints just fine

Yes.

	-thomas

Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list