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

Home » Public Forums » archive » Re: how to draw contour with continue color?
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 draw contour with continue color? [message #63661 is a reply to message #63657] Sat, 15 November 2008 20:13 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
xqinshan writes:

> Hi, I use "contour...nlevels=..../fill" to get contour plot. The color
> variation is seperated. Although if I set nlevels=50 or more it looks
> better, but the contour color is not continuous. When I donot set
> nleves for "colorbar", the color of colorbar is continuous.But how can
> I do for contour?

You want an image, not a filled contour plot.

data = Dist(300)
step = (Max(data) - Min(data)) / 16.
levels = Indgen(16) * step + Min(data)
Device, Decomposed=1
CTLoad, 4, /Brewer
pos = [0.15, 0.15, 0.9, 0.75]
Erase, Color=FSC_Color('ivory')
TVImage, BytScl(data), POSITION=pos
Contour, data, /NOERASE, POSITION=pos, XSTYLE=1, YSTYLE=1, $
LEVELS=levels, COLOR=FSC_Color('black'), $
C_LABEL=Replicate(1, 16)
Colorbar, NCOLORS=256, RANGE=[Min(data), Max(data)], DIVISIONS=4, $
POSITION=[0.15, 0.8, 0.9, 0.85], /TOP, COLOR=FSC_Color('black')

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.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
Previous Topic: read ascii
Next Topic: Philosophical Question about NAN

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

Current Time: Fri Oct 10 03:41:57 PDT 2025

Total time taken to generate the page: 0.40074 seconds