Re: Color in PLOT(S)?? [message #44501] |
Wed, 22 June 2005 03:05  |
Ricardo Bugalho
Messages: 22 Registered: March 2005
|
Junior Member |
|
|
On Wed, 22 Jun 2005 10:23:31 +0200, Matthias Demuzere wrote:
> Hi all,
>
> I'm trying to make a 2D Bias plot with values fluctuating from -300 to 300
> (same line). Is it possible to plot the negative values in RED and the
> positive values in BLUE?
> Can anyone help me with that?
>
Make two plots (one for the positive, another for the negative), replacing
the Y that you don't want with !VALUES.F_NAN.
You might have to interpolate the data to get the points at Y = 0 or
you'll get gaps.
|
|
|
Re: Color in PLOT(S)?? [message #44503 is a reply to message #44501] |
Wed, 22 June 2005 05:28  |
Haje Korth
Messages: 651 Registered: May 1997
|
Senior Member |
|
|
Here are the steps that I would use:
1. Define a color bar with blue colors in the indices 0-127, where 0 is dark
blue and 127 is white. Then you put the red colors in indices 127-255, where
127 is white and 255 is the dark red.
2. Then use bytscl to scale your range: xbyte=bytscl(x,min=-300,max=300)
3. Use TV to display the array.
Haje
"Matthias Demuzere" <Matthias.demuzere@geo.kuleuven.ac.be> wrote in message
news:1119428608.611549@seven.kulnet.kuleuven.ac.be...
> Hi all,
>
> I'm trying to make a 2D Bias plot with values fluctuating from -300 to 300
> (same line). Is it possible to plot the negative values in RED and the
> positive values in BLUE?
> Can anyone help me with that?
>
> Thanx!!
> Matthias
>
> --
> ************************************************************
> ************************************************************
> Physical and Regional Geography Research Group
> Redingenstraat 16
> B-3000 Leuven
> Belgium
>
> Tel: +32 16 326453
> Fax: +32 16 326400
> E-mail: Matthias.Demuzere@geo.kuleuven.be
> ************************************************************
> ************************************************************
>
> "You don't need a weatherman to know which way the wind is blowing..."
>
> Bob Dylan
>
|
|
|