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

Home » Public Forums » archive » trying to convert map to graphic functions
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
trying to convert map to graphic functions [message #93305] Fri, 10 June 2016 06:38 Go to previous message
Brian McNoldy is currently offline  Brian McNoldy
Messages: 35
Registered: July 2000
Member
I still don't use the "new" graphics system much, just because the old way is so entrenched in my memory. But I do really like the new system when I do try it (and can get it to do what I want).
I have a plot that I'd love to switch over, but have had a rather hard time getting the same behavior.

It begins with a map (box axes, 0.5 degree lat/lon spacing, simple decimal degree labels aligned parallel with the axes). Then I have a series of colored dots on there (looks like a squiggly rainbow line), where the colors vary by altitude. Then there are wind barbs, which are also colored by altitude. The wind barbs have a quality flag value printed next to them. Finally, I draw circles around the top and bottom points of the colored dots.
The code looks like this:

window,0,xsize=900,ysize=950
loadct,39
!p.color=0
!p.background=255
map_set,/cyl,limit=[min(lat)-2,min(lon)-2,max(lat)+2,max(lon )+2],/isotropic,/noborder,position=[0.02,0.04,0.98,0.90]
map_continents,/hi,/coasts
map_grid,latdel=0.5,londel=0.5,/box_axes
for p=0,n_elements(pres)-1 do begin
plots,lon[p],lat[p],psym=3,thick=10,symsize=5,color=(pres[p] /max(pres))*254
endfor
plot_range_rings2,dist_thresh*111.2,lon[0],lat[0],color=50
plot_range_rings2,dist_thresh*111.2,lon[-1],lat[-1],color=23 0
for p=0,n_elements(amv_pres)-1 do begin
wind_barb,amv_wspd[p],amv_wdir[p],amv_lons[p],amv_lats[p],$
size=0.1,color=(amv_pres[p]/max(amv_pres))*254
xyouts,amv_lons[p],amv_lats[p],string(amv_qi[p],format='(f4. 2)'),$
charsize=1,/data,noclip=0
endfor
xyouts,0.5,0.96,title_string,charsize=3,align=0.5,/normal

The figure looks like this:
http://andrew.rsmas.miami.edu/bmcnoldy/tmp/map_example.png


I have been stumped just trying to get the grids and labels to look the same! I'm also not sure how to loop through and vary the plotting color by value using SYMBOL but not in indexed color space.

Maybe this is a case where it's best to stick with what I've got, but if anyone has any quick insights, I'd be happy to try them!

Thanks,
Brian
[Message index]
 
Read Message
Read Message
Previous Topic: IDL new graphics memory leak?
Next Topic: Finding high rise buildings using shadows

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

Current Time: Wed Oct 08 11:46:51 PDT 2025

Total time taken to generate the page: 0.00187 seconds