Here's an example. I usually receive daily updates, so I will post
this directly to the list.
Thanks much: cannot test much more today, as I must prepare the
poster and the talk
and finish the report by Saturday PM (a common story, no doubt). I
will try to imitate
the reply format.
I will mail a PNG of the example directly to Steve if possible.
Notes from a Word 2004 session which I have captured into a PNG.
Printing gives similar results. As I mentioned, Word is useful in
capturing
exploratory sessions which are not suitable for finished code and a
source(file.R)
> quartz()
> plot(c(1,2,3,4,5),(c(1,2,3,4,5))^2)
Copy/Paste to Preview, then Copy/Paste to Word (2004)
Also: Copy/Paste to Preview, then Copy/Paste to GraphicConverter
{ALL BLACK FIELD}
Insert Picture to Word (2005) from PDF saved from Preview:
{CORRECT DISPLAY }
> library(fields)
> quartz()
> x<- 1:10; y<- 1:15; z<- outer( x,y,"+")
> image.plot(x,y,z)
> points( 5:12, 5:12, pch="X", cex=3) # example from image.plot page
Copy/Paste to Preview, then Copy/Paste to Word (2004)
Similar results: Copy/Paste to Preview, then Copy/Paste to
GraphicConverter v 5.5.2
{ALL BLACK O UTSIDE AXES, CORRECT INSIDE. X's show}
Similar results with image(x,y,z) (I know itÂ’s not same usage).
> 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.
>
> That is likely a bug in whatever program you're pasting it in as it
> doesn't handle transparency properly (by default the plot is painted
> on a transparent background so it's easier to adapt it to your style
> in Keynote etc.). I was checking with Adobe CS2 and it works without
> problems, so I suspect your application is simply too old to handle
> that. You don't need to use Preview, you can paste straight from
> Quartz without problems.
> 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.
> > 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.
>
> There is no such thing as "higher quality PDFs". All PDFs contain the
> plot as-is (whether you use copy/paste, quartz PDF output or pdf
> device). What you probably mean is high quality PNG (bitmap) images.
> Those can be created with quartz.save by specifying the target
> resolution such as:
> quartz.save("foo.png",dpi=300)
> However, that is not what you want to use for publications.
>
> Note that MS products cannot handle PDF (definitely not on the
Windows
> side), so you cannot use PDF there (which is really stupid, but
that's
> another story). That's why you may prefer higher-resolution PNG if
the
> document is to be shared with Windows people.
I am referring to Sections 7.2 and 7.3 of the "R for Mac OS X FAQ"
which implies a difference in the quality of the PDF's presented.
Presumably the same fundamentals are allowed, but different graphics
engines perform with different skill. For example, I find that
gs frequently gives less-desirable images.
Microsoft Word 2004 for Mac seems to import PDF's OK, and so does
PowerPoint 2004. I just tested these.
They seem to give identical results, although I believe
that Word is inclined to translate to Windows Bitmap Format at the
slightest provocation (usually a bad idea). I have had some
difficulty with PowerPoint and pdf's in previous years.
Thanks, Bob C
[[alternative HTML version deleted]]
_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac