[R] two issues (black and white trellis graphics)

Wiener, Matthew matthew_wiener at merck.com
Thu Feb 3 21:12:33 CET 2005


On the first issue, there's a recent post you can find in the archives.
It's from Deepayan Sarkar on January 2 this year.  It would probably pop up
on a search for "black white lattice" or something similar.

The key part of his answer:

I'd do something like this as part of the initialization:

<<...>>
library(lattice)
ltheme <- canonical.theme(color = FALSE)     ## in-built B&W theme
ltheme$strip.background$col <- "transparent" ## change strip bg
lattice.options(default.theme = ltheme)      ## set as default

Hope this helps,

Matt Wiener


-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Dean Sonneborn
Sent: Thursday, February 03, 2005 2:53 PM
To: R-help at stat.math.ethz.ch
Subject: [R] two issues


I'm working on a graphic but have run into a road block about two 
issues.  I don't have a color printer so I want to produce the graphic in 
black and white. I'm currently using this 
statement  trellis.device(bg="white")  but the body of the graphic contains 
color. What is the code to create the whole thing in black and white. The 
other issue might be a bit more tricky. I'm using this statement: 
auto.key=TRUE  and in the body of the graphic I'm getting two different 
symbols and on the screen I see two symbols in the key but when I print it 
the key only contains one symbol for both!

here's the whole R code statement:
dotplot(chemical~adjlogmle| convert*tdnew, data=allrisk , group=rodentx, 
main="Interspecies Conversion", pch=1:2, auto.key=TRUE, scales = 
list(tick.number=10), fontfamily = "HersheySans")

Thanks,

Dean Sonneborn M.S.
Public Health Sciences *
University of California, Davis
916 734-6656

* formerly Epidemiology & Preventive Medicine

	[[alternative HTML version deleted]]

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html




More information about the R-help mailing list