plotting symbols on map using direct graphics 8.2 [message #81202] |
Thu, 30 August 2012 12:08  |
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 #81300 is a reply to message #81202] |
Thu, 30 August 2012 12:42  |
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)
|
|
|