Skip to content

Graphics ?

2 messages · Yves Gauvreau, Brian Ripley

#
Hi,

In the Windows version of R 0.65.1 I'd like to copy the results of a plot to
the clipboard either as a bitmap or as a metafile. The same thing in fact as
does the menu "Copy to the clipboard" provides but from the command line. I
intend to use the DCOM server version of R to do plots, among other things
and copy the results to the clipboard and show these on a picture box in my
own VB application.

Thanks in advance.

Yves

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Fri, 10 Dec 1999, Yves Gauvreau wrote:

            
The answer is in the file gnuwin32/devga.c. Just see what the menu actually
calls. For a bitmap, you need to write some compiled code that calls
copytoclipboard. (Or use savePlot to write a bmp file, in rw0900 and
later.)

For a metafile, I believe you can use savePlot with file name "": you can
certainly use this to write to a file and then read it into your VB
application.

However, why not plot directly to a metafile or bmp file and then display
that?  That avoids writing graphics on a screen somewhere that you don't
want displayed.

If you are doing this sort of thing you really need to keep fully
up-to-date with R versions. Thomas Baier's DCOM server (it is not a version
of R) has been updated, and you will need R 0.90.1 (due next week) to
run with version 0.91 of his server.  Or compile up R-release now.

A more informative subject line would be helpful.