[R] R plots pdf() does not allow spotcolors?
Ted Harding
ted.harding at wlandres.net
Wed Apr 13 15:18:01 CEST 2011
On 13-Apr-11 12:30:26, Ben Bolker wrote:
> Matthieu Stigler <matthieu.stigler <at> gmail.com> writes:
>>
>> Hi
>> We are about to publish a book, which contains figures made
>> with R plots. An important detail that we did not take into
>> account is that the book will not be printed in 4 colors
>> (cmyk mode), but only 2 (black +"spotcolor"). The spotcolor
>> we use is part of the big Pantone family.
>>
>> The problem is that both pdf() and postscript() offer either
>> rgb or cmyk, but no spotcolors such as pantone. I'm afraid
>> this constraint can't be solved at all, and we can't use R
>> for creating these plots? I did not find any package that
>> would extend the colormodel to include spot colors... Did
>> anyone had a similar experience?
>
> Wasn't aware of spotcolors, but I bet you could hack the PDF
> reasonably easily (if you have many figures you might have to
> use awk/sed/perl ?) ... if you don't use R, what is your
> alternative for creating the figures?
>
> Ben Bolker
Don't expect to hack PDF "reasonably easily" -- for many reasons,
one of which is that in PDF different bits of a document can be
(and usually are) encapsulated in PDF "objects", whose physical
location in the PDF file can be pretty random (there is a kind
of "hash index" at the beginning which points to them). So a PDF
file can be heavily fragmented (as also can a PS file, though
usually not nearly so heavily). In theory it would be possible
for every single character in a textual document to be in a
separate "PDF object" and located in random order in the file!
As a general comment (which unfortunately doesn't address the
main problem raised by Matthieu), it can often be better to
use independent software to create figures/diagrams based on
numerical results computed by R. R's plots are quite nicely
done by default, but tweaking them to achieve a preferred
layout in R itself can be painfully time-consuming. Myself,
I farm this out to the 'pic' preprocessor in troff/groff,
using which any details whatever can be arranged exactly to
one's taste.
Since spotcolour printing is a multi-pass procedure, one can
prepare the separate "layers" in the respective colours, along
with any necessary crop-marks or "bulls-eyes", quite easily.
However, this too generates PS output in the first instance
(convertible to PDF of course), so suffers the same "binding"
to the RGB/CMYK colour paradigm. So Pantone would not be
available in the first instance (except insofar as a subset
of the Pantone "spectrum" corresponds to colours in CMYK).
However, I presume it is highly likely that there is software
which can take a file (PS or PDF) prepared using RGB/CMYK, and
convert this to a Pantone-compatible file.
Even so, this would depend on what your publisher/printer
requires in what you submit. It would be important to obtain
from them a full and exact specification of what they require
for colour printing in files submitted to them for printing.
Hoping this is of some help ...
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <ted.harding at wlandres.net>
Fax-to-email: +44 (0)870 094 0861
Date: 13-Apr-11 Time: 14:17:56
------------------------------ XFMail ------------------------------
More information about the R-help
mailing list