Re: Colorbar with fixed level and color [message #81420 is a reply to message #81419] |
Fri, 14 September 2012 06:57   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Rosie,
You may prefer this color bar:
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, NColors=20, Bottom=1, /Brewer
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.")
|
|
|