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

Home » Public Forums » archive » Problem: Filled contour Plots
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
Problem: Filled contour Plots [message #16535] Wed, 04 August 1999 00:00 Go to next message
amit99 is currently offline  amit99
Messages: 6
Registered: July 1999
Junior Member
I have been trying to make contour plots where some of the levels are
filled either with lines or with a solid color, with limited success.

I am using map_set to define a grid and plot gridded data over the
globe. My plotting instructions are as follows:

contour,indata,lon,lat,/overplot,nlevels=3,c_orientation=[45 ,45,0]

sometimes it works and sometimes I get the error message:

Internal error: Border sort.

With some of the datasets I try to plot, even though all my datasets
have exactly the same format. I also get the same error message if I
try to specify the levels I want to plot with levels=[...]

Any Insights ?

Amit amit@physics.utoronto.ca


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Re: Problem: Filled contour Plots [message #16538 is a reply to message #16535] Tue, 03 August 1999 00:00 Go to previous messageGo to next message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Amit (amit99@my-deja.com) writes:

> I have been trying to make contour plots where some of the levels are
> filled either with lines or with a solid color, with limited success.
>
> I am using map_set to define a grid and plot gridded data over the
> globe. My plotting instructions are as follows:
>
> contour,indata,lon,lat,/overplot,nlevels=3,c_orientation=[45 ,45,0]
>
> sometimes it works and sometimes I get the error message:
>
> Internal error: Border sort.
>
> With some of the datasets I try to plot, even though all my datasets
> have exactly the same format. I also get the same error message if I
> try to specify the levels I want to plot with levels=[...]
>
> Any Insights ?

All I know is that it is hopeless to get filled contour
plots to work correctly if you use the NLEVELS keyword. :-(

See these articles:

http://www.dfanning.com/tips/nlevels.html
http://www.dfanning.com/tips/contour_fill.html
http://www.dfanning.com/tips/contour_hole.html

Cheers,

David

P.S. With filled contours and map projections it doesn't
ever hurt to have the very latest version of IDL, either. :-)

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Problem: Filled contour Plots [message #16607 is a reply to message #16535] Thu, 05 August 1999 00:00 Go to previous message
amit99 is currently offline  amit99
Messages: 6
Registered: July 1999
Junior Member
>
> contour....., level=[min(data), 0], /fill, c_colors=[xxx]
>
> Cheers,
>
> David


Thanks David,


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Re: Problem: Filled contour Plots [message #16612 is a reply to message #16535] Thu, 05 August 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Amit (amit99@my-deja.com) writes:

> Thanks, that solved part of the problem, except it was with my
> longitude values. It helped to limit them to (-180,+180), I had values
> like 180.01 causing problems.
>
> But, I still cannot get the result I want. I am making one contour, at
> the value `0'. I want to fill/shade only one level, of two (I want to
> shade all values below zero), but every permuation of c_colors always
> shades the values above zero.
>
> my command line looks like:
>
> contour....,level=[0],/fill,c_colors[xxx]
>
> where for [xxx] I tried [0,190], [190,0], [190], all giving the same
> (undesired) result.
>
> Any help appreciated.

Did you read the articles I suggested? :-)

http://www.dfanning.com/tips/contour_hole.html

Something like this might help. Sigh...

contour....., level=[min(data), 0], /fill, c_colors=[xxx]

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Problem: Filled contour Plots [message #16616 is a reply to message #16535] Thu, 05 August 1999 00:00 Go to previous message
amit99 is currently offline  amit99
Messages: 6
Registered: July 1999
Junior Member
> Caution
> Do not draw filled contours over the poles on Cylindrical map
> projections. In this case, the polar points map to lines on the map,
and
> the interpolation becomes ambiguous, causing errors in filling. One
> possible work-around is to limit the latitudes to the range of -89.9
> degrees to + 89.9 degrees, avoiding the poles.
>
> R.Bauer
>
>
Thanks, that solved part of the problem, except it was with my
longitude values. It helped to limit them to (-180,+180), I had values
like 180.01 causing problems.

But, I still cannot get the result I want. I am making one contour, at
the value `0'. I want to fill/shade only one level, of two (I want to
shade all values below zero), but every permuation of c_colors always
shades the values above zero.

my command line looks like:

contour....,level=[0],/fill,c_colors[xxx]

where for [xxx] I tried [0,190], [190,0], [190], all giving the same
(undesired) result.

Any help appreciated.

Amit amit@physics.utoronto.ca


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: double max value?
Next Topic: SHOWIMAGE bug fix

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

Current Time: Thu Oct 09 16:04:45 PDT 2025

Total time taken to generate the page: 0.80224 seconds