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

Home » Public Forums » archive » plotting symbols on map using direct graphics 8.2
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
plotting symbols on map using direct graphics 8.2 [message #81202] Thu, 30 August 2012 12:08 Go to next message
Teddy Allen is currently offline  Teddy Allen
Messages: 13
Registered: October 2010
Junior Member
I would like to be able to use the new direct graphics method to plot symbols on a map. From what I understand, the older IDL version uses the PLOTS command to do this. I cannot seem to find any similar option to use with the newer 8.0 version. I want to place a triangle as a symbol at a specific lat/lon location on a map. In addition, I would like to be able to plot filled triangles and upsidedown triangles as well. Below is what I would like to produce:


nlon=9500
nlat=3500
lon=(95-findgen(nlon)*.01)*(-1)
lat=35-findgen(nlat)*.01

; I WOULD LIKE TO USE THE BELOW, BUT PLOT SYMBOLS and NOT TEXT.
map = MAP('MERCATOR', FILL_COLOR = "Pale turquoise",$
LIMIT = [5.0, -95, 35.0, -55.0],label_show=0)
islands = MAPCONTINENTS(/countries, COLOR = "brown",FILL_COLOR='green')
star = TEXT(-77.5, 25.0, /DATA, '*',FONT_SIZE=28, FONT_STYLE='Bold',FONT_COLOR='yellow')


; I WANT TO AVOID THIS OLDER STYLE OF SCRIPTING
device, decomposed=0, get_decomposed=olddc
loadct, 25
map_set, /cylindrical, /noerase, limit=[5, -95, 35, -55],$
position=[0.1, 0.1, 0.8, 0.9]
map_continents, color=81, thick=2
plots, -77.5, 25, psym=5, symsize=1.5, color=200, thick=1
decomposed=olddc

STOP
END
Re: plotting symbols on map using direct graphics 8.2 [message #81297 is a reply to message #81202] Thu, 30 August 2012 14:51 Go to previous message
DavidF[1] is currently offline  DavidF[1]
Messages: 94
Registered: April 2012
Member
Teddy Allen writes:

> p = SYMBOL(-77.5,25.0,symbol=5,/data)

I agree this is how this should work, but I don't see the symbol on my map. :-(

Using IDL 8.2, Windows 64-bit OS. Does anyone else see it?

Cheers,

David
Re: plotting symbols on map using direct graphics 8.2 [message #81300 is a reply to message #81202] Thu, 30 August 2012 12:42 Go to previous message
Teddy Allen is currently offline  Teddy Allen
Messages: 13
Registered: October 2010
Junior Member
On Thursday, August 30, 2012 3:08:23 PM UTC-4, Teddy Allen wrote:
> I would like to be able to use the new direct graphics method to plot symbols on a map. From what I understand, the older IDL version uses the PLOTS command to do this. I cannot seem to find any similar option to use with the newer 8.0 version. I want to place a triangle as a symbol at a specific lat/lon location on a map. In addition, I would like to be able to plot filled triangles and upsidedown triangles as well. Below is what I would like to produce:
>
>
>
>
>
> nlon=9500
>
> nlat=3500
>
> lon=(95-findgen(nlon)*.01)*(-1)
>
> lat=35-findgen(nlat)*.01
>
>
>
> ; I WOULD LIKE TO USE THE BELOW, BUT PLOT SYMBOLS and NOT TEXT.
>
> map = MAP('MERCATOR', FILL_COLOR = "Pale turquoise",$
>
> LIMIT = [5.0, -95, 35.0, -55.0],label_show=0)
>
> islands = MAPCONTINENTS(/countries, COLOR = "brown",FILL_COLOR='green')
>
> star = TEXT(-77.5, 25.0, /DATA, '*',FONT_SIZE=28, FONT_STYLE='Bold',FONT_COLOR='yellow')
>
>
>
>
>
> ; I WANT TO AVOID THIS OLDER STYLE OF SCRIPTING
>
> device, decomposed=0, get_decomposed=olddc
>
> loadct, 25
>
> map_set, /cylindrical, /noerase, limit=[5, -95, 35, -55],$
>
> position=[0.1, 0.1, 0.8, 0.9]
>
> map_continents, color=81, thick=2
>
> plots, -77.5, 25, psym=5, symsize=1.5, color=200, thick=1
>
> decomposed=olddc
>
>
>
> STOP
>
> END



REALIZED that I need to replace

star = TEXT(-77.5, 25.0, /DATA, '*',$
FONT_SIZE=28$,FONT_STYLE='Bold',FONT_COLOR='yellow')

with

p = SYMBOL(-77.5,25.0,symbol=5,/data)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Succinct way of testing array membership
Next Topic: Akima interpolation methods in IDL?

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

Current Time: Wed Oct 08 17:12:33 PDT 2025

Total time taken to generate the page: 0.00399 seconds