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

Home » Public Forums » archive » Re: Overlay multiple filled contour plots?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Overlay multiple filled contour plots? [message #46286 is a reply to message #46209] Wed, 09 November 2005 18:47 Go to previous messageGo to previous message
Sarah is currently offline  Sarah
Messages: 3
Registered: November 2005
Junior Member
Thanks Peter,

This has helped alot. You were right in assuming that 'some other
variable' is defined and to be plotted over both land and sea, but does
not fill the entire region. And further I had hoped to overlay several
(non-overlapping) filled variables in the plot. Creating the colour
table and appropriately filling a 'plot_array' works well. I will
certainly use this in the future.

Unfortunately, I want to make use of the map projections and continents
within the mapping routines as well!

The solution I've come up with is to use tvrd to capture each screen I
want, then merge them together, in a similar fashion as you suggested
above.

It's a bit clunky, but this is the script I came up with:

map_set,cen_lat,cen_lon, $
limit = [min(xlat), min(xlong), max(xlat), max(xlong)], $
/lambert, /continents

;get terrain image

contour,hgt,xlong,xlat,levels = [0,1,100,500,750,1000,1500,2000,2500],
$
c_colors = [0,2,4,6,8,10,12,14,15],/fill, /overplot

array_1 = tvrd(true=1)

;get variable points to overlay, in this case xland

plot_points = where(xland ge 2, count)

sxld= size(xland)

plot_array = intarr(sxld[1],sxld[2])
if count ne 0 then plot_array[plot_points] = 1

contour, plot_array, xlong, xlat, levels = [1], $
c_colors = [0], /fill, /overplot ; plot ocean white

array_points = tvrd()

points = where(array_points ne 0, count)

; get variable image

contour, xland, xlong, xlat, levels = [2], $
c_colors = [64], /fill, /overplot

array_2 = tvrd(true=1)

; overlay array_2 onto array_1 at overlay points


if count ne 0 then begin

array_temp = reform(array_1[0,*,*])
array_temp[points] = (array_2[0,*,*])[points]
array_1[0,*,*] = array_temp

array_temp = reform(array_1[1,*,*])
array_temp[points] = (array_2[1,*,*])[points]
array_1[1,*,*] = array_temp

array_temp = reform(array_1[2,*,*])
array_temp[points] = (array_2[2,*,*])[points]
array_1[2,*,*] = array_temp

endif

tv, array_1, true = 1

It seems to do okay!

Cheers, Sarah
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Save 2D conversion matrix
Next Topic: IDL 6.2 IDLgrImage SUB_RECT and TILING

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

Current Time: Sat Oct 11 06:22:00 PDT 2025

Total time taken to generate the page: 0.88035 seconds