Problem: Filled contour Plots [message #16535] |
Wed, 04 August 1999 00:00  |
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   |
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 #16612 is a reply to message #16535] |
Thu, 05 August 1999 00:00  |
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  |
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.
|
|
|