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

Home » Public Forums » archive » Re: How to plot multiple cgContour plots using the same colour levels (but containing differing data)
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: How to plot multiple cgContour plots using the same colour levels (but containing differing data) [message #88304 is a reply to message #76398] Thu, 10 April 2014 13:42 Go to previous messageGo to previous message
siumtesfai is currently offline  siumtesfai
Messages: 62
Registered: April 2013
Member
On Tuesday, May 31, 2011 12:03:53 AM UTC-4, David Fanning wrote:
> Balt writes:
>
>> Well, since by clipping to less than the max value I'm always going to
>> be below the max color palette entry, out of bounds should not be a
>> condition that ever occurs?
>
> Sorry, I guess I miss understood what you were trying
> to do. Is this the kind of thing you are trying to do?
>
> data = cgDemoData(2)
> data1 = Scale_Vector(data, 400, 1500)
> data2 = Scale_Vector(data, 0, 900)
> data3 = Scale_Vector(data, 250, 1350)
>
> levels = Indgen(16)*100
> cgLoadCT, 33, NColors=16, Bottom=1
> c_colors = Indgen(16) + 1
> cgDisplay, 900, 300
> !P.Multi=[0,3,1]
> ymargin = !Y.OMargin
> !Y.OMargin=[3,10]
> cgContour, data1, Levels=levels, C_Color=c_colors, /Fill, $
> XStyle=1, YStyle=1
> cgContour, data2, Levels=levels, C_Color=c_colors, /Fill, $
> XStyle=1, YStyle=1
> cgContour, data3, Levels=levels, C_Color=c_colors, /Fill, $
> XStyle=1, YStyle=1
> cgColorbar, NColors=16, Bottom=1, RANGE=[Min(data), Max(data)], $
> Divisions=16, position = [0.25, 0.85, 0.75, 0.89]
> !P.Multi=0
> !Y.OMargin = ymargin
> END
>
> 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.")

Hell David,

The above code for contour plot will not work when you have data that ranges between negative and positive . It works the above code when all your data have positive value.

What would you be your advice or suggestion on that.

Best regards
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: call ITK from IDL
Next Topic: Error with cg output and ImageMagick

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

Current Time: Wed Oct 08 20:11:16 PDT 2025

Total time taken to generate the page: 0.00368 seconds