[S] Summary for Color Table Question

Karen_Johnson@bdhq.bd.com
Wed, 30 Sep 1998 10:52:14 -0400


I asked, "Is there a way to set the ColorTable permanently
or at least for the session?" (I use 4.5 with NT). Thanks to
Steve Friedman, Bill Dunlap, and John Wallace for their help.

The most satisfactory solution comes from Bill Dunlap.

Put the following in the .First file

options(default.device = expression({graphsheet();
guiModify("GraphSheet", Name = paste("GSD",
dev.cur(), sep = ""),
ColorTable =
"0,0,0|128,128,128|224,224,224|248,248,248|
254,30,30|232,232,17|60,60,240|255,109,21|
80,200,86|150,0,180|45,100,45|204,2,2|
255,106,163|255,175,128|234,136,255|0,0,150"
)}))

then using

dev.start()

to start up the new graphsheet device. (Also, if you have no
active device and you call a graphics function then
dev.start() is automatically called.) dev.start() evaluates
the expression given by options("default.default") if one
exists, otherwise it selects the default device based on what
machine you are on.

This works for session. It seems to work for graphic windows
opened with graphsheet() as well as dev.start() (nice, as I don't
have to abandon pages=T and other nifty arguments that can be
used with graphsheet()).

Also I'm going to follow Steve's suggestion and create a tiny
funciton that specifies the color table for funcitons I write for
beyond my own use. (I ought to know that - modular good,
repetition bad - but I needed the reminder.)

As I've done my share of 4.5 bashing, I would like to add that
multiple pages in the graphics window has engendered the single
most dramatic
increase in productivity I've experienced since I learned how to
write functions.

Thanks again,
KJJ

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news