| Re: Missing fill colours in contour plot [message #82803 is a reply to message #82802] |
Wed, 16 January 2013 06:34   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
ljs15@fsmail.net writes:
> Right, I've just done some more checking, and when I specify the colour values to range from 0-255 it works, but when I set them to range from 0-250 it doesn't. The two plots are shown at http://www.physics.open.ac.uk/~lsteele/contour2.
>
> In the two plots shown, the left is done using ccol=floor(findgen(ncont)/(ncont-1)*255) and the right is done using ccol=floor(findgen(ncont)/(ncont-1)*250), with ncont=30. So, the only change is going from 255 to 250, with the contours being correct at 255.
>
> Does anyone know why this would be causing a problem?
I think you have a fairly odd way of selecting colors and contours,
which is causing a mismatch between the contours, the data, and the
colors. What happens if you set the contours and colors up this way:
minv = Floor(min(array))
maxv = Ceil(max(array))
ncont = 30
clevels = Findgen(ncont) * ((maxv - minv) / ncont) + minv
LoadCT, 25, NCOLORS=ncont, BOTTOM=1
ccol= Bindgen(ncont)+1B
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|
|