[R] Wiki for Graphics tips for MacOS X

Gabor Grothendieck ggrothendieck at gmail.com
Fri Feb 2 01:39:13 CET 2007


I don't have a Linux system to try it with but
omitting both dev.control statements it worked for me
between two Windows XP sessions on the same
machine using this version of R:

> R.version.string # Windows XP
[1] "R version 2.4.1 Patched (2006-12-30 r40331)"

It also successfully worked with:

> R.version.string # Windows XP
[1] "R version 2.5.0 Under development (unstable) (2007-01-31 r40623)"



On 2/1/07, Patrick Connolly <p_connolly at ihug.co.nz> wrote:
> On Wed, 31-Jan-2007 at 12:11PM -0500, Gabor Grothendieck wrote:
>
> |> To get the best results you need to transfer it using vector
> |> graphics rather than bitmapped graphics:
> |>
> |> http://www.stc-saz.org/resources/0203_graphics.pdf
> |>
> |> There are a number of variations described here (see
> |> entire thread).  Its for UNIX and Windows but I think
> |> it would likely work similarly on Mac and Windows:
> |>
> |> http://finzi.psych.upenn.edu/R/Rhelp02a/archive/32297.html
>
> I found that interesting, particularly this part:
>
> For example, on Linux do this:
>
>   dev.control(displaylist="enable") # enable display list
>   plot(1:10)
>   myplot <- recordPlot() # load displaylist into variable
>   save(myplot, file="myplot", ascii=TRUE)
>
> Send the ascii file, myplot, to the Windows machine and on Windows do this:
>
>   dev.control(displaylist="enable") # enable display list
>   load("myplot")
>   myplot # displays the plot
>   savePlot("myplot", type="wmf") # saves current plot as wmf
>
> I tried that, but I was never able to load the myplot in the Windows
> R.  I always got a message about a syntax error to do with ' ' but I
> was unable to work out what the problem was.  I thought it was because
> the transfer to Windows wasn't binary, but that wasn't the problem.
>
> I was unable to get the thread view at that archive to function so I
> was unable to see if there were any follow ups which offered an
> explanation.
>
> R has changed quite a bit in the years since then, so it might be that
> something needs to be done differently with more recent versions.
>
> Has anyone done this recently?
>
> --
> ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
>   ___    Patrick Connolly
>  {~._.~}                         Great minds discuss ideas
>  _( Y )_                        Middle minds discuss events
> (:_~*~_:)                        Small minds discuss people
>  (_)-(_)                                   ..... Anon
>
> ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
>



More information about the R-help mailing list