Jerry,
You can use gsn_add_text to add the station values, the same way that
you use gsn_add_polymarker. You can then use the resource "txJust" to
control how the text is position with respect to the X,Y value that
you pass to gsn_add_text. For example, assuming your SST values are
in a array called "sst_vals", then your code might look like this:
sst_labels = new(dimsizes(sst_vals),string)
sst_labels = sst_vals
txres = True
txres@txJust = "CenterRight"
text = gsn_add_text(wks,sst,lon,lat,txres)
plot1 = gsn_add_polymarker(wks,plot,lon,lat,polyres)
The SST labels, then, will be just to the right of each polymarker.
--Mary
On Thu, 4 Aug 2005, jerry wrote:
> Hello
> I have some station data with latitude and longitude and SST.
> I use the the follow code to plot station position on the map
>
> begin
> f = asciiread("station.asc",(/20,4/),"float")
> lat = f(:,0)
> lon = f(:,1)
> res = True
> res@gsnDraw = False
> res@gsnFrame = False
> polyres = True
> polyres@gsMarkerIndex = 16
> polyres@gsMarkerSizeF = 5
> wks = gsn_open_wks("x11","test")
> plot = gsn_csm_map_ce(wks,res)
>
> plot1 = gsn_add_polymarker(wks,plot,lon,lat,polyres)
> draw(wks)
> frame(wks)
> end
>
> But i still want to draw the value(SST) beside the station point.
> How can i do?
>
> thanks for help
_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2b29 : Thu Aug 04 2005 - 08:56:41 MDT