[R] Color eps/ps output from specialized plots?
Turgut Durduran
durduran at yahoo.com
Mon Oct 23 22:40:19 CEST 2006
Hello,
First a disclaimer :) I am very new to using R.
I am generating some plots and eventhough I can get colored output in the encapsulated postscript files in the simplest of commands (e.g. plot(1:10,1:10, type="l", col="red") ), it does not work for the particular plots I want. It works on the screen.
Here is an example taken out from "Mixed-Effects Models in S and S-Plus by Pinheiro and Bates";
library(nlme)
plot(CO2)
postscript("tmp.eps")
plot(CO2)
dev.off()
The first plot has few colors on the screen, but postscript output is monochrome. I tried a more complex one too:
postscript("test1.eps",horizontal = FALSE, onefile = FALSE, paper = "special").
BTW, loading NLME chances the built-in (is it really?) data-set "CO2" to a groupeddata with a formula
uptake ~ conc | Plant , which could be recreated as:
CO2 <- groupedData( uptake ~ conc | Plant,data=CO2)
I could not dig out any pointers on figuring this issue out from the internet, specially since the simple plot command works.
Turgut
More information about the R-help
mailing list