Hi,
I have a strong problem, to get a low value TAPER in the colorbar procedure in case where the contour field includes negative values.
To demonstrate this is, I changed the example in the colorbar/taper documentation as seen in the attached example.
The top figure produces both taper ends, the bottom figure produce only the upper taper.
Any help is welcome
Thomas
idl code start
--------------------------------------------------------------------------------------------------------------------
pro test
file = FILEPATH('convec.dat', $
SUBDIR=['examples', 'data'])
z = READ_BINARY(file,DATA_DIMS=[248,248])
fz=float(z)
index = [0,30,60,90,120,150,220]
c1 = CONTOUR(fz, /FILL, ASPECT_RATIO=1, DIM=[300,500], $
RGB_TABLE=39, RGB_INDICES=index, C_VALUE=index, $
LAYOUT=[1,2,1], AXIS_STYLE=0, MARGIN=0)
; Create a discrete colorbar with vertical orientation.
; The ends are automatically tapered for a filled contour.
c1 = COLORBAR(TARGET=c1, TITLE='Convection', /BORDER, $
ORIENTATION=1, TEXTPOS=1, POSITION=[0.8,0.55,0.85,0.95])
c2 = CONTOUR(fz-10., /FILL, ASPECT_RATIO=1, DIM=[300,500], $
RGB_TABLE=39, RGB_INDICES=index, C_VALUE=index, $
LAYOUT=[1,2,2], AXIS_STYLE=0, MARGIN=0, /Current)
; Create a discrete colorbar with vertical orientation.
; The ends are automatically tapered for a filled contour.
cb = COLORBAR(TARGET=c2, TITLE='Convection', /BORDER, $
ORIENTATION=1, TEXTPOS=1, POSITION=[0.8,0.05,0.85,0.45])
c1.save,'test.png',with=500
end
|