[R] black and white colormodel for postscript figure

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Dec 12 18:26:27 CET 2006


On Tue, 12 Dec 2006, Bent Nielsen wrote:

> I would like to produce simple black and white postscript figures for
> publishing.   A black/white or grayscale or CMYK colormodel can be used, but not
> RGB colours.
>
> Can I produce postscript graphs in R that satisfy this?

Unfortunately not directly: the graphics driver only uses RGB.

However, if the plot only contains 'black and white', it probably actually 
only contains black, indicated by '0 0 0 rgb' (as white is normally 
transparent).  Edit that to '0 setgray'.  If you do have any white, edit
'1 1 1 rgb' to '1 setgray'.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list