Surely though one may have to do quite a bit of tinkering to get pdf output that looks exactly like the quartz output. The result for dev.copy() or quartz.save() is generally fairly close.
>From that point of view, it would be useful (save a few clicks) to be able to plot pdf of jpeg output directly to the screen. Or is there a way to do that, short of printing to a file that is already open in Preview. John Maindonald email: [email protected] phone : +61 2 (6125)3473 fax : +61 2(6125)5549 Centre for Mathematics & Its Applications, Room 1194, John Dedman Mathematical Sciences Building (Building 27) Australian National University, Canberra ACT 0200. http://www.maths.anu.edu.au/~johnm On 29/01/2013, at 10:45 PM, Duncan Murdoch <[email protected]> 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 >> [email protected] >> https://stat.ethz.ch/mailman/listinfo/r-sig-mac >> > > _______________________________________________ > R-SIG-Mac mailing list > [email protected] > https://stat.ethz.ch/mailman/listinfo/r-sig-mac _______________________________________________ R-SIG-Mac mailing list [email protected] https://stat.ethz.ch/mailman/listinfo/r-sig-mac
