comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Add a colorbar in a filled contour
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Add a colorbar in a filled contour [message #60923] Wed, 25 June 2008 02:01 Go to next message
duxiyu@gmail.com is currently offline  duxiyu@gmail.com
Messages: 88
Registered: March 2007
Member
Dear all,

I am using D Fanning's colorbar routine.
But I have some questions about the corresponding value for each
color.

For example,

A=DIS(31,41)
DEVICE, DECOMPOSED=0
LOADCT, 5, NCOLORS=100
CONTOUR, A, POSITION=[0.15, 0.15, 0.95, 0.75], $
C_COLORS=INDGEN(100), NLEVELS=100, /FILLl

For min(A)=0 and max(A)=25, the color with index '0' should present
the value '0' and the color with index '99' should present the value
'25'.
Therefore, when I use the COLORBAR routine, the keywords RANGE should
be given.
COLORBAR, NCOLORS=100, POSITION=[0.15, 0.85, 0.95, 0.90],
RANGE=[min(A), max(A)]
Is it right?

If the minimum or maximum of the array has a floating-point value like
3.24, is the above command to add the colorbas still right?

Best regards,
Du Jian
Re: Add a colorbar in a filled contour [message #81437 is a reply to message #60923] Thu, 13 September 2012 04:48 Go to previous message
Rosie is currently offline  Rosie
Messages: 27
Registered: September 2012
Junior Member
On Wednesday, June 25, 2008 10:01:46 AM UTC+1, dux...@gmail.com wrote:
> Dear all,
>
> I am using D Fanning's colorbar routine.
> But I have some questions about the corresponding value for each
> color.
>
> For example,
>
> A=DIS(31,41)
> DEVICE, DECOMPOSED=0
> LOADCT, 5, NCOLORS=100
> CONTOUR, A, POSITION=[0.15, 0.15, 0.95, 0.75], $
> C_COLORS=INDGEN(100), NLEVELS=100, /FILLl
>
> For min(A)=0 and max(A)=25, the color with index '0' should present
> the value '0' and the color with index '99' should present the value
> '25'.
> Therefore, when I use the COLORBAR routine, the keywords RANGE should
> be given.
> COLORBAR, NCOLORS=100, POSITION=[0.15, 0.85, 0.95, 0.90],
> RANGE=[min(A), max(A)]
> Is it right?
>
> If the minimum or maximum of the array has a floating-point value like
> 3.24, is the above command to add the colorbas still right?
>
> Best regards,
> Du Jian
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: What does GRID keyword to INTERPOLATE do?
Next Topic: Display and Navigate Image in IDL 8.2

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:10:36 PDT 2025

Total time taken to generate the page: 0.00991 seconds