<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I think you need to use larger marker sizes. Try making them a factor of 5 or 10 larger.<div><br></div><div>--Mary</div><div><br><div><div>On Aug 19, 2012, at 1:15 AM, xiang lin wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi, all <div><br></div><div><br></div><div> I made a classified post map using NCL, Here below is my scripts ( derived from the example in the <a href="http://ncl.ucar.edu/Applications/Scripts/polyg_8.ncl">http://ncl.ucar.edu/Applications/Scripts/polyg_8.ncl</a>).</div>
<div><br></div><div>I can not get the correct gsmarker sizes as described in the scripts (as seen in the attached ps file). Anyone can give me some instruction? Thank!</div><div><br></div><div><div><br></div><div>; *****************************************************</div>
<div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"</div>
<div><br></div><div>begin</div><div><br></div><div>data_path = "/data1/Antarctic_Data/Antarctic_station.temp_1979-2011/"</div><div><br></div><div>sta_name = (/"Amundsen_Scott","Bellingshausen","Casey","Davis","Dumont_Durville","Faraday_Vernadsky","Halley","Mawson","Mirny","Neumayer_1982-2011","Novolazarevskaya",\</div>
<div> "Orcadas","Rothera","Scott_Base","Syowa"/)</div><div><br></div><div><br></div><div><br></div><div>; ****************** read the AAO index series ********************************************</div>
<div>data = asciiread("/data1/Antarctic_Data/AAO_monthly_197901-201112.txt",(/33*12,3/),"float")</div><div>vars = (/"DJF","MAM","JJA","SON","ANN"/)</div>
<div>xx = data(:,2)</div><div>xx!0 = "time"</div><div>xx&time= fspan(1979.08,2012.,33*12)</div><div><br></div><div>y = new((/5,33/),"float")</div><div>y(4,:) = month_to_annual(xx,1)</div>
<div>y(0,:) = month_to_season(xx,"DJF")</div><div>y(1,:) = month_to_season(xx,"MAM")</div><div>y(2,:) = month_to_season(xx,"JJA")</div><div>y(3,:) = month_to_season(xx,"SON")</div>
<div>printVarSummary(y)</div><div>y!0 = "nvars"</div><div>delete(data)</div><div><br></div><div><br></div><div>; calculate the correlation </div><div>ccr = new((/14,5/),"float")</div><div>do i = 0,13</div>
<div> </div><div> data_filename = data_path + sta_name(i) + ".txt"</div><div> print(" " + data_filename)</div><div><br></div><div> data = asciiread(data_filename, (/33,14/),"float")</div>
<div> x = data(:,1:12)</div><div> xy = ndtooned(x)</div><div> xy!0 = "time"</div><div> z = new((/5,33/),"float")</div><div> z(4,:) = data(:,13)</div>
<div> z(0,:) = month_to_season(xy,"DJF") </div><div> z(1,:) = month_to_season(xy,"MAM") </div><div> z(2,:) = month_to_season(xy,"JJA") </div><div> z(3,:) = month_to_season(xy,"SON") </div>
<div><br></div><div> ccr(i,:) = escorc(y,z)</div><div> </div><div>end do</div><div><br></div><div>opt = True</div><div>opt@fout = "Corr_AAO.vs.stationTemp.dat"</div><div>ftmx = "5f8.3"</div>
<div>write_matrix(ccr, ftmx, opt)</div><div><br></div><div>; plot ********************************</div><div><br></div><div>; -------Options--------</div><div><br></div><div> arr = (/-0.45,-0.35,0.,0.35,0.45/) ; bin settings (bin0 = < 0., </div>
<div> ; bin1 = 0.:4.999, etc.)</div><div> colors = (/"blue","blue","blue","red","red","red"/) ; marker colors, dimsizes must </div>
<div> ; be equal to dimsizes(arr)+1</div><div><b> sizes = (/3,2,1,1,2,3/)*0.006</b></div><div> labels = new(dimsizes(arr)+1,string) ; Labels for legend.</div><div><br></div><div>
npts = 14</div><div> lat = asciiread("14stations_lat.txt",-1,"float")</div><div> lon = asciiread("14stations_lon.txt",-1,"float")</div><div> data1 = asciiread("Corr_AAO.vs.stationTemp.dat",(/14,5/),"float") </div>
<div> R = data1(:,1)</div><div> season = "MAM" </div><div><br></div><div>; ------------------------------ </div><div>; Create X and Y arrays to hold the points for each range and initialize</div><div>; them to missing values. We want to use num_distinct_markers</div>
<div>; different colors, so we need num_distinct_markers sets of X and</div><div>; Y points.</div><div>;</div><div> num_distinct_markers = dimsizes(arr)+1 ; number of distinct markers</div><div> lat_new = new((/num_distinct_markers,dimsizes(R)/),float,-999)</div>
<div> lon_new = new((/num_distinct_markers,dimsizes(R)/),float,-999)</div><div>;</div><div>; Group the points according to which range they fall in. At the</div><div>; same time, create the label that we will use later in the legend.</div>
<div>; </div><div> do i = 0, num_distinct_markers-1</div><div> if (i.eq.0) then</div><div> indexes = ind(R.lt.arr(0))</div><div> labels(i) = "x < " + arr(0)</div><div> end if</div><div>
if (i.eq.num_distinct_markers-1) then</div><div> indexes = ind(R.ge.max(arr))</div><div> labels(i) = "x >= " + max(arr)</div><div> end if</div><div> if (i.gt.0.and.i.lt.num_distinct_markers-1) then </div>
<div> indexes = ind(R.ge.arr(i-1).and.R.lt.arr(i))</div><div> labels(i) = arr(i-1) + " <= x < " + arr(i)</div><div> end if</div><div>;</div><div>; Now that we have the set of indexes whose values fall within </div>
<div>; the given range, take the corresponding lat/lon values and store</div><div>; them, so later we can color this set of markers with the appropriate</div><div>; color.</div><div>;</div><div> if (.not.any(ismissing(indexes))) then </div>
<div> npts_range = dimsizes(indexes) ; # of points in this range.</div><div> lat_new(i,0:npts_range-1) = lat(indexes)</div><div> lon_new(i,0:npts_range-1) = lon(indexes)</div><div> end if</div><div> delete(indexes) ; Necessary b/c "indexes" may be a different</div>
<div> ; size next time.</div><div> end do</div><div><br></div><div>;===========================================================================</div><div>; Begin plotting section.</div><div>
;</div><div> wks = gsn_open_wks("eps","Corr_AAO.vs.Antarctic.StationTemp_" + season ) ; Open a workstation and</div><div> gsn_define_colormap(wks,"WhViBlGrYeOrRe") ; define a different colormap.</div>
<div><br></div><div> nc1 = NhlNewColor(wks,.8,.8,.8) ; Add light gray to colormap,</div><div> ; for continents. </div><div>;</div><div>; Set up some map resources</div>
<div>;</div><div> mpres = True</div><div> mpres@gsnMaximize = True ; Maximize plot in frame.</div><div> mpres@gsnFrame = False ; Don't advance the frame</div><div>;</div><div>
; Zoom in on United States.</div><div>;</div><div> ; mpres@mpMinLatF = 25.</div><div> ; mpres@mpMaxLatF = 50.</div><div> ; mpres@mpMinLonF = 235.</div><div> ; mpres@mpMaxLonF = 290.</div><div><br></div><div> mpres@gsnPolar = "SH"</div>
<div> mpres@mpMaxLatF = -50</div><div><br></div><div>; mpres@mpFillColors = (/-1,-1,nc1,-1/) ;assign light gray to land masses</div><div><br></div><div>; mpres@tiMainString = "Dummy station data colored and~C~sized according to range of values"</div>
<div> mpres@tiMainString = "Correlation: AAO vs Temperature (" + season + ")"</div><div> map = gsn_csm_map(wks,mpres)</div><div><br></div><div> </div><div>; Create logical variables to hold the marker and text resources.</div>
<div>; These markers are different than the XY markers, because they are not</div><div>; associated with an XY plot. You can put these markers on any plot.</div><div>;</div><div> gsres = True</div><div> gsres@gsMarkerIndex = 16 ; Use filled dots for markers.</div>
<div><br></div><div> txres = True</div><div> txres@txFontHeightF = 0.015</div><div><br></div><div>;</div><div>; Loop through each grouping of markers, and draw them one set at</div><div>; a time, assigning the proper color and size with gsn_marker.</div>
<div>;</div><div>; At the same time, draw a legend showing the meaning of the markers.</div><div>;</div><div><br></div><div> xleg = (/0.07,0.07,0.32,0.32,0.57,0.57,0.82,0.82/) ; Location of</div><div> xtxt = (/0.16,0.16,0.44,0.44,0.66,0.66,0.91,0.91/) ; legend markers</div>
<div> yleg = (/0.22,0.17,0.22,0.17,0.22,0.17,0.22,0.17/) - 0.03 ; and text</div><div> ytxt = (/0.22,0.17,0.22,0.17,0.22,0.17,0.22,0.17/) - 0.03 ; strings.</div><div><br></div><div> do i = 0, num_distinct_markers-1</div>
<div> print(" " + lat_new(i,0))</div><div> if (.not.ismissing(lat_new(i,0)))</div><div> gsres@gsMarkerColor = colors(i)</div><div><b> gsres@gsMarkerSizeF = sizes(i)</b></div><div> gsn_polymarker(wks,map,lon_new(i,:),lat_new(i,:),gsres)</div>
<div> end if</div><div>; Add marker and text for the legend.</div><div>;</div><div> gsn_polymarker_ndc(wks, xleg(i),yleg(i),gsres)</div><div> gsn_text_ndc (wks,labels(i),xtxt(i),ytxt(i),txres)</div>
<div> ; end if</div><div> end do</div><div><br></div><div> frame(wks) ; Advance the frame.</div><div><br></div><div> </div><div>end</div><div><br></div><div><br></div><div><br></div><div>Leo</div><div><br></div><div>
<br></div></div>
<span><Corr_AAO.vs.Antarctic.StationTemp_MAM.eps></span>_______________________________________________<br>ncl-talk mailing list<br>List instructions, subscriber options, unsubscribe:<br><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br></blockquote></div><br></div></body></html>