s-news
[Top] [All Lists]

Re: Controlling colour coding in image plots

To: <kim.pilegaard@risoe.dk>, <s-news@wubios.wustl.edu>
Subject: Re: Controlling colour coding in image plots
From: "Alan Hochberg" <alan.hochberg@prosanos.com>
Date: Mon, 24 Jan 2005 14:45:14 -0500
In-reply-to: <003801c50242$0ea50500$c8a66f82@Context>
Thread-index: AcUCQg0NOojRRqxNRr2aK+geiiqjvwACV3ow
Kim,

We wanted to define a color scheme of "cool" and "warm" colors for a
graph--a regular graph, not using image().  We could do it under GUI control
from the Options/Color Schemes menu.  At least under Windows, we found out
(by looking at the History file) that this calls the guiSetOption function.
Here is a function that we use to up a color scheme for graphs, specifying
RGB (red/green/blue) values for each of sixteen colors.  Make sure there are
no line breaks in the value string:

mycolors <- function() {
        #
        #       This function sets up a graded color map for col=1 to 15,
with
        #       BLACK as color 16.
        #
        guiSetOption(option.name="UserColors", value.string="User 1")
        guiSetOption(option.name="SchemeColorTableUser",
        
value.string="20,80,20|30,140,20|50,170,20|80,200,20|120,220,20|250,250,20|2
50,204,20|250,153,20|250,79,20|250,0,20|220,30,70|200,30,100|170,30,150|150,
30,190|150,30,210|0,0,0")
}

Alan Hochberg
Vice President, Research
ProSanos Corp.
Harrisburg, PA USA





<Prev in Thread] Current Thread [Next in Thread>