[R] Exporting an rgl graph

cgenolin at u-paris10.fr cgenolin at u-paris10.fr
Thu Apr 15 14:01:59 CEST 2010

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.


> 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 ------------------------------

More information about the R-help mailing list