Kim,
You can actually alter the colours of an
image plot once you realise that the colours are graph-device dependent.
You set up originally a graph device with
its underlying colour parameters and then call the image plot.
The following to steps should do it:
# step 1: To set up a graph device with 2 main
colours (white, navy blue), each having 5 shades [the colours are defined in
RGB values].
graphsheet(num.image.colors=2,num.image.shades="5,5",image.color.table="255,255,255|0,79,97
")
# step 2: Now we can call the image plot
image(matrix(runif(10000),100))
This solution is attributed to Richard
Pugh, and it first appeared in his website http://www.mango-solutions.com/
Dimitrios
From:
s-news-owner@lists.biostat.wustl.edu
[mailto:s-news-owner@lists.biostat.wustl.edu] On
Behalf Of kim.pilegaard@risoe.dk
Sent: 22 January 2005 19:02
To: s-news@wubios.wustl.edu
Subject: [S] Controlling colour
coding in image plots
I am using image() for coloured plots. I have two questions:
1) How do I specify colours other than by changing them in
the graphics device (e.g. motif)
2) How can I control the colour coding, so that when using
different datasets I always maintain the same colour for the same interval?
=======================================
Kim Pilegaard, Ph.D.
Acting Head of Department
Biosystems Department
Risoe National Laboratory
Building 776
P.O. Box 49, DK-4000 Roskilde, Denmark
Phone: +45 4677 4101
Fax: +45 4677 4109
E-mail: kim.pilegaard@risoe.dk