[ncl-talk] markers with different colors
Geeta Geeta
geetag54 at yahoo.com
Thu Oct 22 12:37:43 MDT 2015
Hi all.
I was trying to give a different color to the rainfall range (value) recently. My actual data is some 300+ stations an when I run that script, the plot was all crowded .
I thought of giving a different color to the marker itself without adding the text/rainfall value to the plot.
here is that part ;---------Adding Markers according to rainfall value
nrf = dimsizes(rf)
markers = new(dimsizes(rf),string)
dont_mark = "red"
res_mark = True
res_mark at gsMarkerIndex = 1 ; 17 predefined markers available
res_mark at gsMarkerSizeF = 0.012
; res_mark at gsMarkerColor = "black"
do n = 0, nrf-1
if (rf(n).eq.0.0) then
res_mark at gsMarkerColor = "Black"
; dum =gsn_add_polymarker(wks,plot,lon,lat,res_mark)
else if ((rf(n).ge.0.1).and.(rf(n).lt.2.4)) then
res_mark at gsMarkerColor = "Blue"
else if ((rf(n).ge.2.5).and.(rf(n).lt.7.5)) then
res_mark at gsMarkerColor = "Red"
end if
end if
end if
; end do
dum =gsn_add_polymarker(wks,plot,lon,lat,res_mark)
end do
print(rf+res_mark at gsMarkerColor)
; ----------Now adding text--------------------I get warning like this and the Plot has Only Black markers????
warning:TransformPostDraw: tfPolyDrawList element 273 is invalid
warning:TransformPostDraw: tfPolyDrawList element 274 is invalid
warning:TransformPostDraw: tfPolyDrawList element 275 is invalid
warning:TransformPostDraw: tfPolyDrawList element 276 is invalid
warning:TransformPostDraw: tfPolyDrawList element 277 is invalid
warning:TransformPostDraw: tfPolyDrawList element 278 is invalid
warning:TransformPostDraw: tfPolyDrawList element 279 is invalid
warning:TransformPostDraw: tfPolyDrawList element 280 is invalid
warning:TransformPostDraw: tfPolyDrawList element 281 is invalid
warning:TransformPostDraw: tfPolyDrawList element 282 is invalid
warning:TransformPostDraw: tfPolyDrawList element 283 is invalid
warning:TransformPostDraw: tfPolyDrawList element 284 is invalid
warning:TransformPostDraw: tfPolyDrawList element 285 is invalid
warning:TransformPostDraw: tfPolyDrawList element 286 is invalid
warning:TransformPostDraw: tfPolyDrawList element 287 is invalid
warning:TransformPostDraw: tfPolyDrawList element 288 is invalid
warning:TransformPostDraw: tfPolyDrawList element 289 is invalid
warning:TransformPostDraw: tfPolyDrawList element 290 is invalid
warning:TransformPostDraw: tfPolyDrawList element 291 is invalid
warning:TransformPostDraw: tfPolyDrawList element 292 is invalid
warning:TransformPostDraw: tfPolyDrawList element 293 is invalid
aditya at agniilap:~/geeta/ncl$
kindly suggest.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151022/27f27c6e/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stn-v6.ncl
Type: application/octet-stream
Size: 5528 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151022/27f27c6e/attachment-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stn-v6.ps
Type: application/postscript
Size: 1470888 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151022/27f27c6e/attachment-0001.ps
More information about the ncl-talk
mailing list