| To: | "s-news" <s-news@lists.biostat.wustl.edu> |
|---|---|
| Subject: | Color of a Trellis Box Plot |
| From: | "Paul Lasky" <phlasky@earthlink.net> |
| Date: | Wed, 24 Dec 2003 08:38:10 -0800 |
| Reply-to: | phlasky@earthlink.net |
|
Many thanks to Sundar Dorai-Raj, Matt Austin, Naomi Robbins, and Rick Ditmars who all suggested the following solution concept, which easily can be implemented with a script:
(use any number for the col parameter, I like "7" which is yellow.)
trellis.par.set( "box.rectangle, list(col=7, lty=1, lwd=1 ) )
trellis.par.set( "box.dot", list(col=7, cex = 1, font=1, pch=16 ) )
trellis.par.set( "box.umbrella", list( col=7,lty=1, lwd=1 ) )
trellis.par.set( "plot.line", list( col=7, lty=1, lwd=1))
trellis.par.set( "plot.symbol", list(cex=1, col=7, font=1, pch=1))
As an alternative, Sundar also suggested changing the color table for example:
trellis.device(graphsheet, color.table =
"0,0,0|0,0,255|0,255,0|255,0,0|255,255,255")
However this solution did not change the colors of the trellis plots but only added different colors to the "user" palette that is accessible from the GUI. These colors can only be used to change the background of Trellis plots, but not the plot images. Finer "shades" are also available see ?graphsheet (the color.table paragraph).
Insightful --- if you are listening --- on the next release, the SPlus GUI needs to be augmented to allow fine control of Trellis graphics including plot colors, symbol sizes etc. Happy holidays, may all yours be colorful.
ORIGINAL MESSAGE:
My Splus 6.1 (running on XP) produces a sickly turquoise colored box plot when I call the trellis function bwplot. How do I change the color from the awful turquoise ? Adding a "col" parameter [e.g. bwplot( Capitaliztion ~ MoRet, data= "" col = 7) ] doesn't do the trick; it simply changes the color of the central dot in the box to a nice yellow while leaving the turquoise box and whiskers unchanged.
In fact on all trellis plots the graph line is plotted in this awful color. So how do I change the default ?
Paul Lasky
B & P Consultants
Truth is embodied in successful prediction |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | How do I correct a threshold warning message in S-plus?, Ryder, Anthony |
|---|---|
| Next by Date: | context search within functions, Xao Ping |
| Previous by Thread: | Re: Color of a Trellis Box Plot, Sundar Dorai-Raj |
| Next by Thread: | yearly hazard with std error, Fredrik Lundgren |
| Indexes: | [Date] [Thread] [Top] [All Lists] |