<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&nbsp;<div><br></div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp;I made a classified post map using NCL, &nbsp;Here below is my scripts ( derived from the example in the&nbsp;<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? &nbsp;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 &nbsp;= "/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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "Orcadas","Rothera","Scott_Base","Syowa"/)</div><div><br></div><div><br></div><div><br></div><div>; ****************** &nbsp;read the AAO index series &nbsp; ********************************************</div>
<div>data &nbsp; = &nbsp;asciiread("/data1/Antarctic_Data/AAO_monthly_197901-201112.txt",(/33*12,3/),"float")</div><div>vars &nbsp; = &nbsp;(/"DJF","MAM","JJA","SON","ANN"/)</div>
<div>xx &nbsp; &nbsp; = &nbsp;data(:,2)</div><div>xx!0 &nbsp; = &nbsp;"time"</div><div>xx&amp;time= &nbsp;fspan(1979.08,2012.,33*12)</div><div><br></div><div>y &nbsp; &nbsp; &nbsp;= &nbsp;new((/5,33/),"float")</div><div>y(4,:) = &nbsp;month_to_annual(xx,1)</div>
<div>y(0,:) = &nbsp;month_to_season(xx,"DJF")</div><div>y(1,:) = &nbsp;month_to_season(xx,"MAM")</div><div>y(2,:) = &nbsp;month_to_season(xx,"JJA")</div><div>y(3,:) = &nbsp;month_to_season(xx,"SON")</div>
<div>printVarSummary(y)</div><div>y!0 &nbsp; &nbsp;= &nbsp;"nvars"</div><div>delete(data)</div><div><br></div><div><br></div><div>; calculate the correlation&nbsp;</div><div>ccr &nbsp; = new((/14,5/),"float")</div><div>do i = 0,13</div>
<div>&nbsp;</div><div>&nbsp; &nbsp;data_filename &nbsp;= data_path + sta_name(i) + ".txt"</div><div>&nbsp; &nbsp;print(" " + data_filename)</div><div><br></div><div>&nbsp; &nbsp;data &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = asciiread(data_filename, (/33,14/),"float")</div>
<div>&nbsp; &nbsp;x &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= data(:,1:12)</div><div>&nbsp; &nbsp;xy &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = ndtooned(x)</div><div>&nbsp; &nbsp;xy!0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = "time"</div><div>&nbsp; &nbsp;z &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= new((/5,33/),"float")</div><div>&nbsp; &nbsp;z(4,:) &nbsp; &nbsp; &nbsp; &nbsp; = data(:,13)</div>
<div>&nbsp; &nbsp;z(0,:) &nbsp; &nbsp; &nbsp; &nbsp; = month_to_season(xy,"DJF") &nbsp; &nbsp;</div><div>&nbsp; &nbsp;z(1,:) &nbsp; &nbsp; &nbsp; &nbsp; = month_to_season(xy,"MAM") &nbsp; &nbsp;</div><div>&nbsp; &nbsp;z(2,:) &nbsp; &nbsp; &nbsp; &nbsp; = month_to_season(xy,"JJA") &nbsp; &nbsp;</div><div>&nbsp; &nbsp;z(3,:) &nbsp; &nbsp; &nbsp; &nbsp; = month_to_season(xy,"SON")&nbsp;</div>
<div><br></div><div>&nbsp; &nbsp;ccr(i,:) &nbsp; &nbsp; &nbsp; = escorc(y,z)</div><div>&nbsp; &nbsp;</div><div>end do</div><div><br></div><div>opt &nbsp;= True</div><div>opt@fout &nbsp;= "Corr_AAO.vs.stationTemp.dat"</div><div>ftmx &nbsp; &nbsp; &nbsp;= "5f8.3"</div>
<div>write_matrix(ccr, ftmx, opt)</div><div><br></div><div>; &nbsp;plot &nbsp;********************************</div><div><br></div><div>; -------Options--------</div><div><br></div><div>&nbsp; arr = (/-0.45,-0.35,0.,0.35,0.45/) &nbsp; &nbsp;; bin settings (bin0 = &lt; 0.,&nbsp;</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; bin1 = 0.:4.999, etc.)</div><div>&nbsp; colors = (/"blue","blue","blue","red","red","red"/) &nbsp;; marker colors, dimsizes must&nbsp;</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; be equal to dimsizes(arr)+1</div><div><b>&nbsp; sizes &nbsp;= (/3,2,1,1,2,3/)*0.006</b></div><div>&nbsp; labels = new(dimsizes(arr)+1,string) &nbsp;; Labels for legend.</div><div><br></div><div>
&nbsp; npts &nbsp; = 14</div><div>&nbsp; lat &nbsp; &nbsp;= asciiread("14stations_lat.txt",-1,"float")</div><div>&nbsp; lon &nbsp; &nbsp;= asciiread("14stations_lon.txt",-1,"float")</div><div>&nbsp; data1 &nbsp;= asciiread("Corr_AAO.vs.stationTemp.dat",(/14,5/),"float")&nbsp;</div>
<div>&nbsp; R &nbsp; &nbsp; &nbsp;= data1(:,1)</div><div>&nbsp; season = "MAM"&nbsp;</div><div><br></div><div>; ------------------------------&nbsp;</div><div>; Create X and Y arrays to hold the points for each range and initialize</div><div>; them to missing values. &nbsp;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>&nbsp; num_distinct_markers = dimsizes(arr)+1 &nbsp; &nbsp; &nbsp; &nbsp;; number of distinct markers</div><div>&nbsp; lat_new = new((/num_distinct_markers,dimsizes(R)/),float,-999)</div>
<div>&nbsp; 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>; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; do i = 0, num_distinct_markers-1</div><div>&nbsp; &nbsp; if (i.eq.0) then</div><div>&nbsp; &nbsp; &nbsp; indexes = ind(R.lt.arr(0))</div><div>&nbsp; &nbsp; &nbsp; labels(i) = "x &lt; " + arr(0)</div><div>&nbsp; &nbsp; end if</div><div>
&nbsp; &nbsp; if (i.eq.num_distinct_markers-1) then</div><div>&nbsp; &nbsp; &nbsp; indexes = ind(R.ge.max(arr))</div><div>&nbsp; &nbsp; &nbsp; labels(i) = "x &gt;= " + max(arr)</div><div>&nbsp; &nbsp; end if</div><div>&nbsp; &nbsp; if (i.gt.0.and.i.lt.num_distinct_markers-1) then &nbsp; &nbsp; &nbsp;&nbsp;</div>
<div>&nbsp; &nbsp; &nbsp; indexes = ind(R.ge.arr(i-1).and.R.lt.arr(i))</div><div>&nbsp; &nbsp; &nbsp; labels(i) = arr(i-1) + " &lt;= x &lt; " + arr(i)</div><div>&nbsp; &nbsp; end if</div><div>;</div><div>; Now that we have the set of indexes whose values fall within&nbsp;</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>&nbsp; &nbsp; if (.not.any(ismissing(indexes))) then&nbsp;</div>
<div>&nbsp; &nbsp; &nbsp; npts_range = dimsizes(indexes) &nbsp; ; # of points in this range.</div><div>&nbsp; &nbsp; &nbsp; lat_new(i,0:npts_range-1) = lat(indexes)</div><div>&nbsp; &nbsp; &nbsp; lon_new(i,0:npts_range-1) = lon(indexes)</div><div>&nbsp; &nbsp; end if</div><div>&nbsp; &nbsp; delete(indexes) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; Necessary b/c "indexes" may be a different</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; size next time.</div><div>&nbsp; end do</div><div><br></div><div>;===========================================================================</div><div>; Begin plotting section.</div><div>
;</div><div>&nbsp; wks = gsn_open_wks("eps","Corr_AAO.vs.Antarctic.StationTemp_" + season ) &nbsp; &nbsp; ; Open a workstation and</div><div>&nbsp; gsn_define_colormap(wks,"WhViBlGrYeOrRe") &nbsp; &nbsp; &nbsp;; define a different colormap.</div>
<div><br></div><div>&nbsp; nc1 = NhlNewColor(wks,.8,.8,.8) &nbsp; &nbsp; &nbsp; &nbsp;; Add light gray to colormap,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; for continents. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>;</div><div>; Set up some map resources</div>
<div>;</div><div>&nbsp; mpres &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= True</div><div>&nbsp; mpres@gsnMaximize &nbsp;= True &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; Maximize plot in frame.</div><div>&nbsp; mpres@gsnFrame &nbsp; &nbsp; = False &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; Don't advance the frame</div><div>;</div><div>
; Zoom in on United States.</div><div>;</div><div>&nbsp;; mpres@mpMinLatF &nbsp; &nbsp;= 25.</div><div>&nbsp;; mpres@mpMaxLatF &nbsp; &nbsp;= 50.</div><div>&nbsp;; mpres@mpMinLonF &nbsp; &nbsp;= 235.</div><div>&nbsp;; mpres@mpMaxLonF &nbsp; &nbsp;= 290.</div><div><br></div><div>&nbsp; mpres@gsnPolar &nbsp; &nbsp; = "SH"</div>
<div>&nbsp; mpres@mpMaxLatF &nbsp; &nbsp;= -50</div><div><br></div><div>; mpres@mpFillColors = (/-1,-1,nc1,-1/) &nbsp; &nbsp;;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>&nbsp; mpres@tiMainString = "Correlation: AAO vs Temperature (" + season + ")"</div><div>&nbsp; &nbsp;map = gsn_csm_map(wks,mpres)</div><div><br></div><div>&nbsp;</div><div>; Create logical variables to hold the marker and text resources.</div>
<div>; &nbsp;These markers are different than the XY markers, because they are not</div><div>; &nbsp;associated with an XY plot. You can put these markers on any plot.</div><div>;</div><div>&nbsp; gsres &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = True</div><div>&nbsp; gsres@gsMarkerIndex = 16 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; Use filled dots for markers.</div>
<div><br></div><div>&nbsp; txres &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = True</div><div>&nbsp; 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>&nbsp; xleg = (/0.07,0.07,0.32,0.32,0.57,0.57,0.82,0.82/) &nbsp; ; Location of</div><div>&nbsp; xtxt = (/0.16,0.16,0.44,0.44,0.66,0.66,0.91,0.91/) &nbsp; ; legend markers</div>
<div>&nbsp; yleg = (/0.22,0.17,0.22,0.17,0.22,0.17,0.22,0.17/) - 0.03 &nbsp; &nbsp;; and text</div><div>&nbsp; ytxt = (/0.22,0.17,0.22,0.17,0.22,0.17,0.22,0.17/) - 0.03 &nbsp; ; strings.</div><div><br></div><div>&nbsp; do i = 0, num_distinct_markers-1</div>
<div>&nbsp; &nbsp; &nbsp; print(" " + lat_new(i,0))</div><div>&nbsp; &nbsp; &nbsp; if (.not.ismissing(lat_new(i,0)))</div><div>&nbsp; &nbsp; &nbsp; gsres@gsMarkerColor &nbsp; &nbsp; &nbsp;= colors(i)</div><div><b>&nbsp; &nbsp; &nbsp; gsres@gsMarkerSizeF &nbsp; &nbsp; &nbsp;= sizes(i)</b></div><div>&nbsp; &nbsp; &nbsp; gsn_polymarker(wks,map,lon_new(i,:),lat_new(i,:),gsres)</div>
<div>&nbsp; &nbsp; &nbsp; end if</div><div>; Add marker and text for the legend.</div><div>;</div><div>&nbsp; &nbsp; &nbsp; gsn_polymarker_ndc(wks, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xleg(i),yleg(i),gsres)</div><div>&nbsp; &nbsp; &nbsp; gsn_text_ndc &nbsp; &nbsp; &nbsp;(wks,labels(i),xtxt(i),ytxt(i),txres)</div>
<div>&nbsp; &nbsp; ; end if</div><div>&nbsp; end do</div><div><br></div><div>&nbsp; frame(wks) &nbsp; &nbsp;; Advance the frame.</div><div><br></div><div>&nbsp;&nbsp;</div><div>end</div><div><br></div><div><br></div><div><br></div><div>Leo</div><div><br></div><div>
<br></div></div>
<span>&lt;Corr_AAO.vs.Antarctic.StationTemp_MAM.eps&gt;</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>