s-news
[Top] [All Lists]

Re: color map

To: "Rosenfeld, Simon (NIH/NCI)" <rosenfes@mail.nih.gov>
Subject: Re: color map
From: "David Smith" <dsmith@insightful.com>
Date: Mon, 11 Nov 2002 09:21:01 -0800
Cc: "S-News (E-mail)" <s-news@wubios.wustl.edu>
Thread-index: AcKJlVfIuuXgoZ8ISfS+aAVBPbBpNgAD9YsA
Thread-topic: [S] color map
On Windows, the trick is to use the image.color.table argument to
graphsheet(). For example:

graphsheet(num.image.colors = 3, num.image.shades = "5,15",
 image.color.table = "0,0,0|255,0,0|255,255,255")

creates a new graphsheet window, where image() creates plots with
shades of white through red to black.  You can also do this through
the GUI by modifying one of the built-in color schemes with
"Options | Color Schemes" -- "User 1" is a good choice, and be sure
to look at the Image Colors tab and make changes to the User 1 section.
You then need to call graphsheet() with the image.color.scheme option:

graphsheet(image.color.scheme="user 1")

Using this method isn't portable though if you want to share your code with
someone else (who won't have the same settings for the User 1 color scheme).
Use the first method above for portability.

# David Smith

P.S. On Unix versions of S-PLUS, changing the image colors is best done using X 
resources.  See "Setting Up Your Windows System" in the "Customizing Your 
S-PLUS Session" section of the Unix User's Guide for details.

-- 
David M Smith <dsmith@insightful.com>
Product Manager, Insightful Corp, Seattle WA
Tel: +1 (206) 802 2360
Fax: +1 (206) 283 6310

Insightful Corporation (www.insightful.com) provides analytical solutions for 
text and data using S-PLUS, Insightful Miner, InFact and consulting services. 

> -----Original Message-----
> From: Rosenfeld, Simon (NIH/NCI) [mailto:rosenfes@mail.nih.gov]
> Sent: Monday, November 11, 2002 7:16 AM
> To: 's-news@lists.biostat.wustl.edu'
> Subject: [S] color map
> 
> 
> Dear Colleagues:
> I am trying to use "image" for the "heat map" representation 
> of my matrix
> (in S-PLUS 2000). However, the colors being invoked 
> automatically are kind
> of dull and illegible. They used to look much better in 
> S-PLUS 3.3.  Is that
> possible in S-PLUS 2000 to design the colors on your own 
> starting directly
> from RGB scales (or somehow otherwise)? I intend to use an
> application-specific color scheme (i.e., to be used within a 
> custom-written
> function)
> 
> Thank you for your help
> Simon Rosenfeld     
> --------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu.  To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message:  unsubscribe s-news
> 
> 

<Prev in Thread] Current Thread [Next in Thread>
  • color map, Rosenfeld, Simon (NIH/NCI)
    • Re: color map, David Smith <=
    • color map, Rosenfeld, Simon (NIH/NCI)