Hi all,
I've been stumped by this for hours now. Not sure what I'm missing. Especially given this is code that works in another scenario just fine. So I have these large vectors of of lat/lon coordinates I'm plotting. I'm selecting the data according to some criteria, and by convention (my own) name the x and y of the current plots just that: x and y.
< data has been read into lat/lon and a few other variables>
;first we get rid of all data that is 0
sel_data = WHERE( lat ne 0, count)
all_lon = lon[sel_data]
all_lat = lat[sel_data]
sel_data = WHERE( lat ne 0 and vs gt 64, count)
x = lon[sel_data]
y = lat[sel_data]
after this, just so you know we have data:
IDL> help,lon
LON DOUBLE = Array[6634]
IDL> help,lat
LAT DOUBLE = Array[6634]
IDL> help,all_lon
ALL_LON DOUBLE = Array[2011]
IDL> help,all_lat
ALL_LAT DOUBLE = Array[2011]
IDL> help,x
X INT = Array[2011]
IDL> help,y
Y DOUBLE = Array[2011]
and lastly:
IDL> print,min(all_lat)
-33.960200
IDL> print,max(all_lat)
-33.317200
IDL> print,max(all_lon)
151.62650
IDL> print,min(all_lon)
151.00180
all looks sensible. Now let's move on:
cgPLOT, x, y, psym=1, POSITION=[0.1, 0.3, 0.7, 0.9], $
TITLE=source + " " + " Positions", /YNOZERO, YSTYLE=3, XSTYLE=3, YRANGE=[min(all_lat),max(all_lat)], XRANGE=[min(all_lon),max(all_lon)], $
XTITLE="Longitude [Deg]", YTITLE="Latitude [Deg]", SYMSIZE=1, color='blue'
This plots the plot as expected, with adequate ranges and position marks. But then I call this:
cgTEXT, -33.7, 151.3, 'RX', color='black'
The RX label never shows up. I also am unable to overplot any symbols using cgPlots. I wonder if maybe the coordinate system somehow got screwed up? But the edge labels show the correct range of lat/lon values for which both the text and plotting routing at position -33.7/151.3 should put those smack bang in the middle of the plot.
So this does not work either:
cgPLOTS, -33.879547, 151.188903, PSYM=4
What's the obvious thing my tired eyes can't see!?
Thanks
- Balt
|