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

Home » Public Forums » archive » Re: question about plot contours over a color figure
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: question about plot contours over a color figure [message #48903] Fri, 02 June 2006 15:49
manodeep@gmail.com is currently offline  manodeep@gmail.com
Messages: 33
Registered: June 2006
Member
yinghui wrote:
> Hi:
>
> I want to plot the confidence level contours over a color figures in a
> PS file.
>
> I have no problem to plot the color figures in the PS file, using
> tv,sdata,x0,y0,xsize=xsize,ysize=ysize,/normal ;;sdata is the data I
> used to plot the figure plot.
> here x0=y0=0.1, xsize=ysize=0.7
>
> But when I want to add the contours on the same plot, I add one line
> after the TV command, as
> contour,tempc,x,y,max_value=100.,min_value=0.,levels=[80.,90 .,95.],
> $
> c_labels=[1,1,1],c_colors=[1,0,1],position=[0.1,0.1,0.8,0.8] ,
> $
> c_charsize=1.,c_charthick=1.5,c_thick=1.5,xstyle=5,ystyle=5,
> $
> /overplot ;tempc is the confidence level data
> No contours come up, or sometimes in a small area at the corner of the
> window.
> I put this line before TV, the contures do not come up for the color
> fiugre covers the contoure lines.
>
> But if I keep the contour command after the TV command, and add almost
> the same contour line before the TV line, as
>
> contour,tempc,x,y,max_value=100.,min_value=0.,levels=[80.,90 .,95.], $
>
> c_labels=[1,1,1],c_colors=[1,0,1],position=[0.1,0.1,0.8,0.8] ,
> $
> c_charsize=1.,c_charthick=1.5,c_thick=1.5,xstyle=5,ystyle=5,
> $
> /noerase
>
> The contours come up as I wanted.
>
> I am wondering what is wrong here, why I need two contour lines
> commands to get the contoure lines come up?
>
> Thanks
>
> yinghui


Take a look at the RSI supplied image_cont.pro -- it plots the data and
overplots it
with contour lines. It would be trivial to modify to display one set of
data and overplot
another set as contours.

Cheers,
Manodeep
Re: question about plot contours over a color figure [message #48920 is a reply to message #48903] Thu, 01 June 2006 16:29 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
yinghui writes:

> I am wondering what is wrong here, why I need two contour lines
> commands to get the contoure lines come up?

You can't both establish the contour data space AND
overplot the contour lines (OVERPLOT keyword) on the
same command. OVERPLOT assumes a data space is already
established. (It is similar to PLOTS in this regard.)

I would use a CONTOUR with NODATA and [XY]STYLE=5 keywords
to establish the data coordinate space. Then use the CONTOUR
command with OVERPLOT to draw the contour lines, if that is
what you want to do.

IMGDISP or TVIMAGE will make this a WHOLE lot easier for you! :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Legend creation on an image
Next Topic: Re: HELP!!!!! How to use IDL to create a move?

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

Current Time: Wed Oct 08 19:46:30 PDT 2025

Total time taken to generate the page: 0.00560 seconds