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 #63651 is a reply to message #63625] Sun, 16 November 2008 07:51 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
xqinshan writes:

> Thanks David. That work well for screen (set_plot,'win'), but for ps
> (set_plot,'ps'),
> device,decomposed=3D1
> dosnot work. There is a white line in the image and colorbar. I hope
> pictures of ps form can be the same as on screen. How to do that?

Here is a version of the program that works on the display
and in PostScript. In the future, if you want something
in PostScript just say so, or write an e-mail to ITTVIS
asking them to PLEASE get to work on updating the PostScript
device. That way, I can jump through the necessary hoops
from the beginning.

data = Dist(300)
step = (Max(data) - Min(data)) / 16.
levels = Indgen(16) * step + Min(data)
IF (!D.Flags AND 256) NE 0 THEN BEGIN
Device, Decomposed=1, Get_Decomposed=theState
Erase, Color=FSC_Color('ivory')
ENDIF
CTLoad, 4, /Brewer, NCOLORS=255
black = FSC_Color('black', 255)
pos = [0.15, 0.15, 0.9, 0.75]
TVImage, BytScl(data, TOP=254), POSITION=pos
Contour, data, /NOERASE, POSITION=pos, XSTYLE=1, YSTYLE=1, $
LEVELS=levels, COLOR=black, C_LABEL=Replicate(1, 16)
Colorbar, NCOLORS=255, RANGE=[Min(data), Max(data)], DIVISIONS=4, $
POSITION=[0.15, 0.8, 0.9, 0.85], /TOP, COLOR=black
IF (!D.Flags AND 256) NE 0 THEN Device, Decomposed=theState
END

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 11:24:58 PDT 2025

Total time taken to generate the page: 1.59849 seconds