Thanks, Steve; this works. albeit in a new way. Some notes for the user follow.
Simple-documentation copy-paste: I must start the device this way to avoid difficulties (see quartz()) quartz(bg="white") Then I may copy and open up the file in Preview; from there, I may copy again and paste into Word or into Graphicconverter. (These probably accepted picts earlier, from what I could infer from the FAQ). If one does not set the background, then the Preview version looks fine, but the image pasted elsewhere has black lettering (usually) on a black background. Hence quartz(bg="white") Higher quality pdf's: I assume I should do a quartz.save to get a high quality image if I think that the image may head to publication. When I do this, the image opens correctly in Preview, but it appears that some images (a filled-contour color field overlaid by labelled contours in plot4d.r) do not display correctly in my old Adobe application (a second whiting out, maybe?. If I do not set bg="white" then both are drawn correctly from the quartz.save() version. regards, Bob On Oct 22, 2008, at 3:46 PM, Steve Revilak wrote: >> Date: Wed, 22 Oct 2008 14:41:07 -0700 >> From: Robert Chatfield <[EMAIL PROTECTED]> >> To: [email protected] >> Subject: [R-SIG-Mac] Difficulties with quartz() device and clipboard? >> I have difficulties with the R-GUI or the R Quartz Window, >> >> At one time it was easy to copy to the clipboard and then paste into >> another document, e.g. Microsoft Word or GraphicConverter or ... >> No more. There is a "Copy" item available (in dark letters, not >> greyed) >> in the Edit menu, but nothing goes into clipboard. I can verify this >> with >> several applications that have a "Show Clipboard" menu item. >> This was great for recording results of exploratory sessions without >> a generating a large number of files. > > This might have something to do with what Word is willing to accept. > With Mac OS 10.5.5, R 2.7.2, GUI 1.25 (5217), I can say > > plot(1:10, 1:10, type="l") > > R opens a quartz window and displays the line plot. From there I can > copy the plot to the clipboard (via Cmd-C or Edit > Copy); after the > copy, I'll switch to Preview.app and press Cmd-N ("New from > clipboard") within Preview; Preview creates a new pdf document with > the plot. > > Perhaps word doesn't handle pasting of pdf data? > > >> Items saved by quartz.save do not seem to open correctly in Preview >> or Acrobat. I assume that one must close the Quartz device with >> dev.off() Maybe I just need an example of quartz.save in action.) > > plot(1:10, 1:10, type="l") > quartz.save("foo.png"); > quartz.save("foo.pdf", type="pdf"); > > After running these three commands, you should have a pdf named > "foo.pdf" and a png named "foo.png". > > HTH. > > Steve Dr. Robert Chatfield Earth Sciences, MS 245-5 NASA Ames Research Center Moffett Field, CA 94035 USA Ph: 650-604-5490 FAX 650-604-3625 http://geo.arc.nasa.gov/sgg/chatfield [[alternative HTML version deleted]] _______________________________________________ R-SIG-Mac mailing list [email protected] https://stat.ethz.ch/mailman/listinfo/r-sig-mac
