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

Home » Public Forums » archive » Re: contour outside the limits
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: contour outside the limits [message #45459] Fri, 16 September 2005 08:18
lajam is currently offline  lajam
Messages: 4
Registered: September 2005
Junior Member
thanks for the help. Actually adding noclip=0 changed nothing. The
solution was to use TRIANGULATE (as David suggested it) and then add
the keyword TRIANGULATION=triangles in the contour function. Now it's
fixed.

Cheers,

Cedric
Re: contour outside the limits [message #45464 is a reply to message #45459] Fri, 16 September 2005 06:45 Go to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
lajam@caramail.com wrote:
> thank you for the answer but I had already tried the xstyle and ystyle
> keyword with values=1 and it changed nothing.
>

Here's a snippet from the IDL 6.2 online docs ...

Graphics Keywords: Accepts all graphics keywords accepted by PLOT except
for: LINESTYLE, PSYM, SYMSIZE. See Graphics Keywords Accepted.

That means the NOCLIP keyword is available to you. The default
behavior is for CONTOUR to clip - but with the OVERPLOT keyword set
maybe there is something going amiss. In any event, I suggest trying
setting NOCLIP = 0 explicity in your call to CONTOUR.

Cheers,
Ben
Re: contour outside the limits [message #45466 is a reply to message #45464] Fri, 16 September 2005 05:54 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
lajam@caramail.com writes:

> thank you for the answer but I had already tried the xstyle and ystyle
> keyword with values=1 and it changed nothing.

Humm, well then, I suppose the problem is in the gridding
of the data into a 2D array (with the use of the IRREGULAR
keyword). I would try gridding the data yourself with TRIGRID
and TRIANGULATE, taking care that the values are in the range
you want. I would also make sure the X and Y values contain
the limits you are looking for.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: contour outside the limits [message #45471 is a reply to message #45466] Fri, 16 September 2005 01:33 Go to previous message
lajam is currently offline  lajam
Messages: 4
Registered: September 2005
Junior Member
thank you for the answer but I had already tried the xstyle and ystyle
keyword with values=1 and it changed nothing.
Re: contour outside the limits [message #45482 is a reply to message #45471] Thu, 15 September 2005 10:35 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
lajam@caramail.com writes:

> I'm using the contour function to draw values on a sub-region of a map.
> The problem is that I obtain contour outside the limits I have defined.
> I read the idl guide and went on this group but I didn't find the right
> way to draw the contour. I have contour outside the limits only on one
> side of my sub-region for the region between (-10.5E;-41.5E) and
> latitude=57.5N. Hereafter my code:
>
> nlevels=24
> labels=fltarr(nlevels)
> limits=[40,-60,80,0]
> colors = fltarr(nlevels)
> for i = 0, nlevels-1 do begin
> colors(i) = 10 + i * (229-20) / (nlevels-1)
> endfor
> labels=[-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19 ,20,21,22]
> map_set, /cylindrical, color=white, /noerase, /continents,
> Limit=limits, xmargin=5, ymargin=10
> map_continents, color = black, mlinethick= 2.0
> map_grid,/box_axes
>
> x=sst_nadr[1,*] ; the longitude between -10.5E and -41.5E
> y=sst_nadr[2,*] ; the latitude between 44.5N and 57.5N
> sst=transpose(sst_nadr[3,*]) ; the values
> contour,sst,x,y, levels = labels, c_colors = colors, /overplot,
> /cell_fill, /irregular
>
>
> Does anybody have an idea of the "bug"?

XSTYLE=1 and YSTYLE=1 keywords are missing on your Contour
command. Does anybody else really like automatic axis scaling? :-(

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: imagen con ejes
Next Topic: Re: Backing Store Question

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

Current Time: Wed Oct 08 13:52:12 PDT 2025

Total time taken to generate the page: 0.00494 seconds