[Rd] Re: [R] Printing Lattice Graphs from Windows (PR#6948)

spencer.graves at pdf.com spencer.graves at pdf.com
Sun Jun 6 23:02:01 CEST 2004

Hi, Duncan: 

      I just did "plot(1:2)" in Rgui.exe, and that copied fine as a 
metafile into MS Word via the clipboard. 

      Then I exited and restarted Rterm.exe under ESS and tried it 
again.  This time, I got a blank image copied into MS Word.  However, 
after I modified the Lattice defaults via, 
"trellis.par.set('background', list('white')); 
trellis.par.set('plot.symbol',  list(cex=0.8, col=1, font=1, pch=1))", I 
was able to copy the results of "xyplot(1~1)" as a metafile into Word.  
Unfortunately, when I tried modifying the Lattice defaults the same way 
under Rgui.exe. I again got a blank image copied into Word. 

      hope this helps.  spencer graves

Duncan Murdoch wrote:

On Sun, 6 Jun 2004 15:00:52 -0500, Dirk Eddelbuettel <edd at debian.org>

>But isn't it a bug in the windows version of R if the Rgui.exe cannot copy
>to the clipboard where Rterm.exe can?

Yes, definitely.  Can someone distill this down to code that uses only
the base packages (e.g. just grid)?  Lattice is a recommended package,
so I'd refer you to its maintainer, but it's probably something in a
base package that's going wrong.

Once you've done that, please submit it as a bug report with
reproducible code.  I've never looked at the Windows metafile device
driver, so it's unlikely I'll fix this by 1.9.1, but it is something
that should be fixed.

Duncan Murdoch

Spencer Graves wrote:

>      I agree:  It sounds like a  bug, as you said, Irk, in that 
> Rgui.exe cannot copy a metafile to the clipboard, at least under MS 
> Windows 2000, 5.00.2195, Service Pack 3, even though Rterm.exe can.  
> Therefore, I'm including "r-bugs at biostat.ku.dk" in the list of 
> addresses to this email.
>      Spencer Graves
> Irk Eddelbuettel wrote:
>> On Sun, Jun 06, 2004 at 12:26:45PM -0700, Spencer Graves wrote:
>>>     Using R 1.9.1 alpha via XEmacs with ESS under Windows 2000, I 
>>> did the following:
>>>     library(lattice)
>>>     xyplot(1~1)
>>>     I got the plot in a separate window, from which I did File -> 
>>> Copy to the clipboard -> as a metafile.  I then changed to MS Word, 
>>> and it pasted fine.   
>> Ok.
>>>     When I started R 1.9.1 alpha directly (without XEmacs) and tried 
>>> the same thing, I got a standard lattice plot.  However, when I 
>>> tried File -> Copy to the clipboard -> as a metafile, I got a blank 
>>> plot when copying into MS Word.  When I copied as a bitmap, it came 
>>> through fine.  However, I suspect that is unacceptable.   
>> Not ok.
>> But isn't it a bug in the windows version of R if the Rgui.exe cannot 
>> copy
>> to the clipboard where Rterm.exe can?
>> I may be missing some subtle detail, though...
>> Irk
> ______________________________________________
> 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-devel mailing list