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

Home » Public Forums » archive » filled contour workaround
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
filled contour workaround [message #3711] Wed, 01 March 1995 14:49 Go to previous message
caron is currently offline  caron
Messages: 16
Registered: May 1994
Junior Member
After putting up with filled contours not working correctly,
I finally stumbled upon a work-around. I am plotting global data
with a world map in /cylindrical projection. So what I used to
do was:
1) call map_set to establish coord.system
2) call contour to draw filled contours, using /overplot
3) call map_continents to put world map on top
only trouble is, often but not always some of the contours would not fill in.
RSI fixed some of the problem in a release, but it has never worked right.

Here's the workaround:
1) call map_set to establish coord. system
2) call contour to draw filled contours, without /overplot: now the
contours are filled correctly, apparently because you let contour routine
establish its own coord. system
3) call map_set again, guessing at the values that make its coord
system the same as the one mysteriously selected by contour
4) call map_continents to put world map on top

Heres the workaround code. the last three lines to contour are new:

; establish projection
map_set, /cylindrical, /noerase, color = 1, limit = limits, /noborder

if cc_contour_filled then begin
contour, arr, cc_lon(cc_lon0:cc_lon1), cc_lat(cc_lat0:cc_lat1), $
levels = cc_contour_levels, $
c_colors = cc_contour_colors, color = 1, $
max_value = imd_missing_data, $
; /overplot, /fill, /follow, /closed, /noerase
xmargin = [0,0], ymargin = [0,0], $
xstyle =4, ystyle = 4, $
/fill, /follow, /closed, /noerase

; draw the continents on top of contours
; some funny bug: must "guess" at contour parameters
map_set, /cylindrical, title = plot_title(level_name(cc_pv_lev_idx)), /noerase, $
color = 1, limit = limits, $
xmargin = [4,4], ymargin = [3,3]
map_continents, color = cc_map_color_idx, mlinethick=1


Maybe someone can improve on this workaround. The problem is that the coord system
is only approximately the same (within a charactor!!). I tried manipulating !x.s and
!y.s but it didnt seem to work.
[Message index]
 
Read Message
Read Message
Previous Topic: encapsulated postsrcipt with preview
Next Topic: MAPs

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

Current Time: Sun Oct 12 10:34:26 PDT 2025

Total time taken to generate the page: 2.47729 seconds