Add a colorbar in a filled contour [message #60923] |
Wed, 25 June 2008 02:01  |
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  |
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
|
|
|