contour palette [message #92297] |
Thu, 12 November 2015 12:15  |
amin farhang
Messages: 39 Registered: November 2010
|
Member |
|
|
Dear All,
Is there any way to plot a contour with two different palette?
for instance in the following example dose it possible to color the data range [0,650] with only blue gradient and fill other levels with yellow color gradient?
data = cgDemoData(2)
cgcontour,data,nlevels=10
|
|
|
Re: contour palette [message #92299 is a reply to message #92297] |
Thu, 12 November 2015 13:18  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Amin Farhang writes:
> Is there any way to plot a contour with two different palette?
> for instance in the following example dose it possible to color the data range [0,650] with only blue gradient and fill other levels with yellow color gradient?
>
> data = cgDemoData(2)
> cgcontour,data,nlevels=10
Decide which color indices you are using to fill the contours so you can
tell cgContour about them (with the C_COLORS keyword), then load
whatever colors you like into those indices. Job done!
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|