[R-SIG-Mac] saving graphs; jpeg(), bitmap()

stefano iacus stefano.iacus at unimi.it
Thu Dec 9 14:04:06 CET 2004


As a general advise.
Once you have a pdf file you can use Preview application (shipped with 
OS X) to export it to almost any format.
If jpeg() and png() do not work, please have a look at any error 
message you get on the R Console or in the Console Application.

stefano

On Dec 9, 2004, at 12:45 PM, Denis Chabot wrote:

> Hi Tiago,
>
> I am surprised pdf() does not work for you, I use it all the time both 
> under Mac OS X 10.2.8 (old R gui, R2.0.1) and OS 10.3.6 (new R gui, R 
> 2.0.1). This file format is one of the things that I really like in R. 
> Great output quality in small file size. Works well in all my 
> applications (except Microsoft products, shame on MS).
>
> I use JPEG only when it is requested by an editor (only happened once 
> for a conference proceedings, the editor did not know a better way to 
> handle without pain (for him) graphics from users on different 
> platforms. Otherwise I avoid it for scientific graphs as it is 
> resolution dependent and zooming quickly reveals pixels and 
> compression artefacts. Beside, even though JPEG greatly reduces the 
> size of bitmaps, the resulting file is still larger than PDF or other 
> vector formats.
>
> Hence I hope you can resolve what prevents you from using pdf() in 
> your scripts. Did you use
> dev.off()
> to terminate file creation?
>
> Sincerely,
>
> Denis Chabot
> Le Jeudi, 9 déce 2004, à 04:55 Europe/Paris, 
> r-sig-mac-request at stat.math.ethz.ch a écrit :
>>
>> From: Tiago R Magalhaes <tiago17 at socrates.Berkeley.EDU>
>> Subject: [R-SIG-Mac] saving graphs; jpeg(), bitmap()
>>
>> Dear Mac R-users
>>
>> I want to export some plots. I have looked in the documentation and
>> in the R-help archives. 2 main functions jpeg(), bitmap() are used,
>> but I can't save any plots using them. (error logs at the end of the
>> email). I'm using a PowerBook G4, Panther 10.3, R.2.1.
>>
>> a) when using jpeg() I seem to be missing the X11 server. I have X11
>> on my computer and it works fine. (XDarwin 1.3b4). On the R menu,
>> under Miscillaneous there is a Run X11 server. When I lauch it
>> reports an error:  "2004-12-08 22:24:13.082 open[10513] Couldn't
>> launch application:  X11.app"
>>
>> b) for using bitmap() I don't have the ghostscript file. Is it a mac
>> file? Should I get it from somewhere?
>>
>> c) I saved the files from the quartz device with the menu function.
>> This solves the problem somewhat, but: I would like to save jpeg
>> files. Even if I save pdf I would like to write it in a script.
>> pdf() should do it, but I can only produce files with zero bytes
>> using it...
>>
>> <...>
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>



More information about the R-SIG-Mac mailing list