Skip to content
Prev 5780 / 15075 Next

Bug with the col option in plot function

Really belongs o R-SIG-Mac list and have copied it there. I cannot  
reproduce on my Mac. I get the same colors on the pdf file with that  
code as I do on the screen device. I have in in the past needed to set  
up a device before plotting:
trellis.device(device="postscript", color = TRUE)  ... but you are not  
using a trellis function or creating postscript.

What does  utils::str(pdf.options()) return?
On mine I get this
List of 15
  $ width      : num 7
  $ height     : num 7
  $ onefile    : logi TRUE
  $ family     : chr "Helvetica"
  $ title      : chr "R Graphics Output"
  $ fonts      : NULL
  $ version    : chr "1.4"
  $ paper      : chr "special"
  $ encoding   : chr "default"
  $ bg         : chr "transparent"
  $ fg         : chr "black"
  $ pointsize  : num 12
  $ pagecentre : logi TRUE
  $ colormodel : chr "rgb"
  $ useDingbats: logi TRUE


Perhaps this could be a cure?:
  pdf.options(colormodel = "rgb")

You probably ought to update as well before raising the bug-flag.