[R] Exporting an rgl graph

Greg Snow Greg.Snow at imail.org
Fri Apr 16 18:25:18 CEST 2010


The easiest approach may be to just install R onto a USB drive (flash/thumb/...) then when you go to your coworkers computer just run R from the USB drive and show the rgl plot.  I think there is also a tool to create an animation from rgl, it is not interactive, but you could e-mail a movie file that they could play to see the plot from many angles.

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of cgenolin at u-paris10.fr
> Sent: Thursday, April 15, 2010 6:02 AM
> To: ted.harding at manchester.ac.uk; Barry Rowlingson
> Cc: r-help at r-project.org
> Subject: Re: [R] Exporting an rgl graph
> 
> Thanks for you answer. Let me precise my question.
> 
> In fact, I do not want to "capture" a screen, I want to save an object
> that can be seen in 3D. With rgl, using my mouse, I can make the object
> move. This is what I want to export: an real 3D object that my
> collaborator will have the possibility to see in 3D.
> 
> Christophe
> 
> 
> > On 15-Apr-10 10:10:54, Barry Rowlingson wrote:
> >> On Thu, Apr 15, 2010 at 10:24 AM,  <cgenolin at u-paris10.fr> wrote:
> >>> Hi the list,
> >>>
> >>> I use rgl to produce a 3D graph. I would like to "show" this graph
> >>> to some collaborator. Is there a way to save it and send it to
> >>> someone else?
> >>
> >> See ?rgl.postscript and ?rgl.snapshot
> >>
> >>  Or use some kind of screen capture system - on Windows the 'Print
> >> Screen' key can copy the screen to the clipboard, paste into
> Photoshop
> >> or other graphics program.
> >>
> >>  On Linux, I use 'scrot' from the command line - type 'scrot -s',
> >> click on a window, and it makes a PNG file of it.
> >
> > Again on Linux, since ImageMagick is installed, I use the 'import'
> > programme from that suite. When you start that, it produces a
> > "+"-shaped mouse cursor which you can use (selecting a top-left-hand
> > corner to start with, and holding down the left mouse button) to
> > drag out a bounding frame for the part of the screen you want to
> > save. Then, when you release the button, an image of that portion
> > of the screen is saved to a file of your choice, in any graphics
> > format of your choice that is supported by ImageMagick (including
> > PS and EPS, as well as all the common butmap formats).
> >
> > See 'man import' for pointers to more information.
> >
> > I have this set up as an icon on my "launch" panel, so it is just
> > a matter of clicking on that, and then doing the above. The command
> > behind the icon is
> >
> >  /usr/local/bin/mkscreengrab
> >
> > and my script file 'mkscreengrab' contains:
> >
> >  #! /bin/bash
> >  export ScrGrbTmp=`mktemp /home/ted/Screengrabs/screengrabXXXX`
> >  import $ScrGrbTmp.jpg
> >  rm $ScrGrbTmp
> >
> > so this makes JPEGs (I could have chosen somthing else, but that's
> > the default I mostly want for that activity). This produces a file
> > with a name like "screengrab4913.jpg" which will be unique in that
> > directory, and it can later be renamed to your taste.
> >
> > If I wanted a different file format, I would use 'import' from
> > the command line, with appropriate filenam extension (e.g. ".png",
> > ".ps", ".eps", ... ).
> >
> > I hadn't heard of scrot before, but now I've looked it up it
> > seems that its output format is limited to PNG.
> >
> > I've now also located more info about various ways of taking
> > screenshots in Linux:
> >
> > http://tips.webdesign10.com/how-to-take-a-screenshot-on-ubuntu-linux
> >
> > Ted.
> >
> > --------------------------------------------------------------------
> > E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk>
> > Fax-to-email: +44 (0)870 094 0861
> > Date: 15-Apr-10                                       Time: 12:18:25
> > ------------------------------ XFMail ------------------------------
> >
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list