Re: Colorbar with fixed level and color [message #81422 is a reply to message #81421] |
Fri, 14 September 2012 06:45   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Rosie writes:
> Few more questions:
>
> 1)Can I do less than -4 with < sign and more than +4 with > sign ?
> 2)Another problem is with green colour, they can hardly be differentiated.
> 3)I used the command division=10, minor=2. But it did not worked.
That color table is an ugly one. ;-)
I think I might try something like this:
nl=19; nl,number of level
level=findgen(nl)*.5-4.5
names = String(level, Format='(f0.1)')
names[[0,18]]=" "
names[Indgen(9)*2+1] = " "
names[0] = '<-4.5'
names[18] = '>4.5'
cgerase
cgLoadCT, 25, Clip=[50,254], NColors=18, Bottom=2, /Brewer
TVLCT, cgColor('red', /Triple), 1
TVLCT, cgColor('blue', /Triple), 20
cgColorBar, NColors=18, Bottom=2, Division=18, $
Range=[Min(level),Max(level)], TickNames=names, $
TickLen=1.0, OOB_Low=1, OOB_High=20
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|