[R-SIG-Mac] Saving or copying graphics from Quartz returns empty file

Davor Cubranic cubranic at stat.ubc.ca
Tue Jan 29 18:08:20 CET 2013


Even if Heather is using a suboptimal way to export graphics, it still shouldn't crash R though. Heather, if this is in any way reproducible, please include the code that causes the crash. Also, run R from the terminal with "--vanilla" option when reproducing if possible (to ensure a clean session), and include the output after the crash. (E.g., "Segmentation fault", or whatever it may be.)

Davor

On 2013-01-29, at 3:45 AM, Duncan Murdoch wrote:

> On 13-01-25 10:59 AM, Heather CHAPMAN wrote:
>> Hi,
>> 
>> Can anyone suggest some help for saving or copying graphs I've created
>> in the Quartz screen? I've read the R-FAQ and tried to search for
>> answers, but have not found anything. I'm using a Mac, Mountain Lion OS,
>> and have version 2.15.2 of R.
> 
> I don't know the cause of the problem you're seeing, but I generally recommend to people that they generate graphs in the final format, rather than saving them from some other format.
> 
> In your case, that would mean working out the code to make your plot look good on screen, then redo it all directly to the pdf device, by simply wrapping the code in
> 
> pdf(file="foo.pdf")
> ... your code to draw the plot ...
> dev.off()
> 
> This is preferable because the graphics system makes some choices (spacing, etc.) based on the characteristics of the output device; if you copy from a screen device to a print device, those
> choices may be different.
> 
> Duncan Murdoch
>> 
>> 
>> When I save a graphic, the process either crashes R, or if it saves a
>> file, when I open it I get a blank file or an error message that reads
>> "The file Rplot.pdf could not be opened." When I try to copy the graphic
>> instead to paste into any other program (Word, Excel, etc), a blank
>> image frame is all I get. I have also tried running graphics and either
>> saving or exporting from RStudio and have the same issues.
>> 
>> 
>> I assume there is some package I've not loaded or some bug fix I need to
>> get, but I can't find any documentation about it. Any ideas?
>> 
>> 
>> Thanks,
>> 
>> Heather Chapman
>> 
>> 
>> Heather Chapman
>> Senior Research Analyst for Assessment
>> Office of Institutional Effectiveness
>> 4002 University Circle
>> Ogden, Utah 84408
>> Phone: (801) 626-7177
>> 
>> 
>> 
>> 
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>> 
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac



More information about the R-SIG-Mac mailing list