Skip to content
Back to formatted view

Raw Message

Message-ID: <4B0BB25F.1080302@bitwrit.com.au>
Date: 2009-11-24T10:15:59Z
From: Jim Lemon
Subject: Natural colours for topographic data
In-Reply-To: <MPG.2575baf34f6fbce29896b1@news.gmane.org>

On 11/24/2009 07:42 PM, Karl Ove Hufthammer wrote:
> On Mon, 23 Nov 2009 12:21:03 -0500 David Winsemius
> <dwinsemius at comcast.net>  wrote:
>    
>>> I would be happy with a simple one, that just mapped negative values
>>> to water colours and positive values to land colours.
>>>        
>> Searching with the strategy "color positive negative zero" in r-search
>> and limiting it to r-help replies,  I get this Jim Lemon reply using
>> (naturally) plotrix's color.scale:
>>
>> http://finzi.psych.upenn.edu/R/Rhelp02/archive/90837.html
>>
>> The application to your needs looks pretty immediate.
>>      
> Thanks for the suggestion, but the arguments that 'color.scale' takes
> (range of red, green and blue values) makes it not very useful for this
> purpose.
>    
Hi Karl,
For a start, you could try:

color.scale(oceandepths,extremes=c("lightblue","blue"))

for the water and

color.scale(vegetationcover,c(0.55,0),0.55,0)

for the land as really basic "natural" colors. There are several ways to 
specify the value to color transformations, and you can even overwrite 
some parts of the color matrix using logical vectors, like coloring 
everything over 4000 meters white for snow.

Jim