comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » COLORBAR
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Colorbar [message #74338 is a reply to message #56724] Thu, 13 January 2011 13:40 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
kisCA writes:

>
> Ok thanks, your commands are quite amazing!
>
> To explain me better maybe an example will help:
> The original range of my data is [-1.06371,0.907327].
> I would like to draw fill contour from -0.8 to 0.8 with an increment
> of 0.1 but keeping the color scale between the original range...
> Is it better this way?

I would do this:

data = Scale_Vector(Dist(41,41), -1.06371 ,0.907327)
levels = [Min(data), Scale_Vector(findgen(17), -0.8, 0.8)]
pos = [0.1, 0.1, 0.9, 0.75]
LoadCT, 33, NColors=16, Bottom=2
TVLCT, FSC_Color('light gray', /Triple), 1
TVLCT, FSC_Color('dark gray', /Triple), 18
FSC_Display, 800, 500
FSC_Contour, data, Levels=levels, /Fill, $
C_Colors=Indgen(20)+1, Position=pos
FSC_Contour, data, Levels=levels, /Overplot, Label=2
labels = ['<-0.8', String(Scale_Vector(findgen(16), -0.8, 0.7),$
Format='(F0.1)'), '>0.8']
DCBar, NColors=18, Bottom=1, Labels=labels, charsize=0.75

This will give you a light grey color for values less
than -0.8 and a dark gray color for values greater than
0.8. Values between -0.8 and 0.8 will be in increments
of 0.1 and in normal colors.

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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: r_correlate; get "loop limit expression too large" error with /Kendall
Next Topic: IDL 8.0 plot lat/lon data into map

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:35:12 PDT 2025

Total time taken to generate the page: 0.00514 seconds