[R] Printing Lattice Graphs from Windows

Charles and Kimberly Maner ckjmaner at carolina.rr.com
Mon Jun 7 02:54:01 CEST 2004


Hi.  Another curious observation.  When executing the following:

> trellis.device(bg="transparent")
> xyplot(1~1)

I can then copy and paste in MS Word fine.  But, printing directly
(right-click, print) still will not work--prints a blank sheet.


--Charles

-----Original Message-----
From: Spencer Graves [mailto:spencer.graves at pdf.com] 
Sent: Sunday, June 06, 2004 8:44 PM
To: Deepayan Sarkar
Cc: r-help at stat.math.ethz.ch; Charles and Kimberly Maner
Subject: Re: [R] Printing Lattice Graphs from Windows

Hi, Deepayan: 

      Following your suggestion, I tried the following in Rgui.exe: 

 > xyplot(1~1)
 > win.metafile()
 > graphics.off()

      I then switched to MS Word, pasted, and got the same blank plot as
before.  (I actually tried other things as well, but came to this after
reading the documentation.) 

      ???
      spencer graves

Deepayan Sarkar wrote:

>On Sunday 06 June 2004 18:10, Charles and Kimberly Maner wrote:
>  
>
>>Hi folks.  It looks like it's stirred some discussion ultimately 
>>resulting/concluding that this phenomena is a possible bug either in 
>>the lattice package or in R 1.9.0/1.9.1 itself.  So, I'll stay tuned, 
>>so to speak, for either an update in the lattice package or R as it 
>>seems that that's where the bug may lie.  FYI, the resulting plot, 
>>(e.g., plot(1~1)), worked as it should either printing or as a copy 
>>and paste as a metafile which causes me to believe it's in the lattice 
>>package.
>>
>>I appreciate you guys looking into this.  (As you may/may not, for 
>>some us corporate folk, data mining is (1) pulling data, (2) producing 
>>a graphical representation of a story/hypothesis from the data and (3) 
>>pasting it into MS Word and/or MS PowerPoint for presentation quickly.  
>>So, to much of you all's potential satisfaction, a number of us use R 
>>instead of S-Plus.)
>>    
>>
>
>I can't check myself, but I believe a possible workaround is to use the 
>respective devices directly (e.g. pdf() or win.metafile()) instead of 
>copying from the GUI menu (at least I haven't heard anyone say that 
>this does not work).
>
>Deepayan
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! 
>http://www.R-project.org/posting-guide.html
>  
>




More information about the R-help mailing list