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

Home » Public Forums » archive » cgText (or XYOUTS for that matter) simply not drawing anything.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
cgText (or XYOUTS for that matter) simply not drawing anything. [message #87685] Sat, 22 February 2014 19:50 Go to previous message
Balthasar Indermuehle is currently offline  Balthasar Indermuehle
Messages: 22
Registered: August 2012
Junior Member
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
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: IDL license file
Next Topic: The eventhandler Mechanism for basewidget.

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

Current Time: Wed Oct 08 15:33:04 PDT 2025

Total time taken to generate the page: 0.00445 seconds