;
; Open NetCDF file containing data on upper-air observations.
;
a =  addfile("data/94080812_upa.cdf","r")

;
; Create an X workstation object with default resources.
;
x = create "x" xWorkstationLayerClass noparent end create

;
; Create a data object and assign the longitude and latitude
; coordinates of every upper-air station to the x and y
; arrays resources respectively.
;
mydata = create "mydata" coordArraysLayerClass noparent
	"caXArray" : a->lon
	"caYArray" : a->lat
	"caXMissingV" : -9999.0
	"caYMissingV" : -9999.0
end create

;
; Create a data-dependent object. (These are used
; to assign resources that are linked only to the
; the data.) In this case it sets up the data to be drawn
; using markers rather than lines.
;
xy_dep = create "xy_dep" xyDataDepLayerClass noparent
	"dsDataItem" : mydata
	"xyMarker" : 6
	"xyMarkerMode": "MARKERSONLY"
	"xyMarkerColor": 4
	"xyMarkerSizeF": .015
end create

;
; Create an HLU XyPlot object and assign the
; the data-dependent object to it.
;
xy_plot = create "xy_plot" xyPlotLayerClass x
	"vpXF" : .15
	"vpYF" : .85
	"vpWidthF" : .7
	"vpHeightF" : .7
	"xyCurveData" : xy_dep 
	"tiMainOn" : "True"
	"tiXAxisOn" : "True"
	"tiYAxisOn" : "True"
	"xyYMinF" : 20.00
	"xyYMaxF" : 60.0
	"xyXMinF" : -125.0
	"xyXMaxF" : -70.0
end create
draw(xy_plot)
update(x)