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 #76398 is a reply to message #76379] Mon, 30 May 2011 21:03 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
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.")
[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 19:35:43 PDT 2025

Total time taken to generate the page: 0.00404 seconds