<div dir="ltr">Hi Qudsia,<div>I have run a test here using gsLineDashPattern and the resource worked as it is documented, so I am not sure why you are not seeing the desired results. What version of NCL are you running? Are all the polylines dashed? Are you seeing any error messages?</div><div><br></div><div>To answer your question about trajectories: No, there is no automatic way to curl the end of polylines. You can add additional X and Y points into gsn_polyline to get the desired effect though.</div><div><br></div><div>Finally, as we always tell everyone, please do not write individuals who respond to ncl-talk inquiries directly unless directed to do so. Most people who respond to ncl-talk are volunteering their time to assist others and are not paid to do so. If your inquiry to ncl-talk has not been answered within a day or so during normal weekday hours you can always repost your inquiry to ncl-talk. </div><div><br></div><div>Assuming you have not figured out the issue please respond to ncl-talk answering the questions above and including your ascii file and output graphic. That way ncl-talk subscribers can better assist in solving your issue.</div><div>Adam</div><div> </div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 28, 2015 at 12:08 AM, qudsia zafar <span dir="ltr">&lt;<a href="mailto:missquaddus@gmail.com" target="_blank">missquaddus@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I am trying to plot trajectories of &#39;solid lines&#39; but i get &#39;dotted lines&#39; every time upon looping gsn_polyline function. The resource &#39;gsLineThicknessF = 1&#39; works but &#39;gsLineDashPattern = 0 does not.  Moreover is there a predefined function available to &#39;curl&#39; the trajectories arriving the source location? Below is what i am working at:<br></div><div><br></div><div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;</div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot;</div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl&quot;</div><div><br></div><div>begin</div><div><br></div><div><br></div><div> fname = &quot;tdump_750_JF.txt&quot;</div><div> ncols = numAsciiCol(fname)</div><div>; print(ncols)</div><div><br></div><div> data = readAsciiTable(fname,ncols,&quot;float&quot;,0)</div><div>; print(data)</div><div><br></div><div><br></div><div> delim= &quot; &quot;</div><div><br></div><div><br></div><div>;printVarSummary(data)</div><div><br></div><div><br></div><div> fld = str_get_field(data, 1, delim)</div><div><br></div><div>;print(fld)</div><div><br></div><div><br></div><div>  dims = dimsizes(fld)</div><div>  ntime = dims(0)</div><div><br></div><div><br></div><div><br></div><div> </div><div> wks = gsn_open_wks(&quot;x11&quot;,&quot;traj&quot;)               ; open workstation</div><div><br></div><div>  gsn_define_colormap (wks,&quot;GMT_haxby&quot;)            ;  (amwg256&quot;)</div><div>  cmap = gsn_retrieve_colormap (wks)</div><div><br></div><div>  ;print(cmap) </div><div><br></div><div><br></div><div><br></div><div><br></div><div>cnlevels = fspan(0,8263.2,26)                       ;   make 26 levels      </div><div><br></div><div>   res            = True                          ; map resources<br></div><div>   res@gsnDraw    = False                         ; don&#39;t draw</div><div>   res@gsnFrame   = False                         ; don&#39;t advance frame</div><div>   res@vpWidthF   = 0.80                          ; make map bigger</div><div>   res@vpHeightF  = 0.80</div><div>   res@mpFillOn                    = False        ; turn off gray fill</div><div>  res@mpOutlineBoundarySets       = &quot;National&quot;   ; turn on country boundaries</div><div>  res@mpGeophysicalLineColor      = &quot;Navy&quot;       ; color of cont. outlines</div><div>  res@mpGeophysicalLineThicknessF = 1.5          ; thickness of outlines</div><div>   res@mpMaxLatF  = 60                           ; select subregion</div><div>   res@mpMinLatF  = -20 </div><div>   res@mpMinLonF  = 40</div><div>   res@mpMaxLonF  = 90</div><div>   </div><div>  </div><div>   res@mpGridSpacingF = 10.0 </div><div><br></div><div><br></div><div>  res_lb                    = True</div><div>   res_lb@vpWidthF           = 0.60</div><div>   res_lb@vpHeightF          = 0.10</div><div>   res_lb@lbPerimOn          = True; False            ; Turn off perimeter.</div><div>   res_lb@lbOrientation      = &quot;Horizontal&quot;     ; Default is vertical.</div><div>   res_lb@lbLabelStride      = 2    </div><div>   res_lb@lbLabelAlignment   = &quot;InteriorEdges&quot;  ; Default is &quot;BoxCenters&quot;.</div><div>   res_lb@lbFillColors       = cmap;rgb_array; cmap(1:,:)       ; Colors for boxes.</div><div>   res_lb@cnLevels           = fspan(0,8263.2,26)</div><div>   res_lb@lbMonoFillPattern  = True             ; Fill them all solid.</div><div>   res_lb@lbLabelFontHeightF = 0.015 </div><div><br></div><div><br></div><div>   map = gsn_csm_map_ce(wks,res)                         ; create map</div><div>  draw(map)</div><div><br></div><div><br></div><div>;*********************************************</div><div>; trajectory parameters</div><div>;*********************************************</div><div><br></div><div>arr2=(/0,483,899,1352,1825,2309,2778,3262,3702,4186,4619,5030,5469,5890,6308,6770,7190,7615,8029,8492,8945,9429,9896,10380,10709,11009,11275/)    ; 5-d trajectories for 26 days. every element defines the end of each day...<br></div><div><br></div><div> <br></div><div> aod = new(26,float)</div><div> aod = 0.0 </div><div><br></div><div>  do i = 0, 25</div><div><br></div><div> aod(i) = data(arr2(i),11)</div><div><br></div><div> end do</div><div><br></div><div>print(aod)</div><div><br></div><div><br></div><div>  ; traj = (/1,10,53,67,80/)          ; choose which trajectories to plot</div><div>;*********************************************</div><div>; some plot parameters</div><div>;*********************************************</div><div>   pres                  = True               ; polyline resources</div><div>   pres@gsLineThicknessF = 1</div><div>   </div><div>   pres@gsLineDashPattern = 0 </div><div> </div><div>        <br></div><div>   mres  = True                               ; marker resources</div><div>   first = True                               ; start of traj resources</div><div>;********************************</div><div> </div><div>   do days = 0,25</div><div><br></div><div>  ;   print(days)</div><div><br></div><div>  do i = arr2(days),arr2(days+1)-1  <br></div><div><br></div><div> ;print(&quot;qudsia&quot;+i)    </div><div><br></div><div>  ndays = (arr2(days+1)-1)-arr2(days)  </div><div><br></div><div>   xpt = new(ndays,float)            ; allocate memory</div><div>   ypt = new(ndays,float)</div><div> ; aod = new(ndays,float)</div><div>   xpt = 0.0</div><div>   ypt = 0.0</div><div> ;  aod = 0.0   </div><div>     </div><div>      ypt = data(i,9)                  ; extract lat from whole array</div><div>      xpt = data(i,10)                  ; extract lon from whole array</div><div>     aod = data(i,11)</div><div><br></div><div><br></div><div>  pres@gsLineColor=GetFillColor(cnlevels,cmap,aod(days))   ; color each trajectory according to height. </div><div>                                            <br></div><div>  </div><div> do pt= 0, dimsizes(xpt)-2   </div><div><br></div><div>    gsn_polyline(wks,map,(/xpt(pt),xpt(pt+1)/),(/ypt(pt),ypt(pt+1)/),pres)</div><div><br></div><div>  end do                                  </div><div>         </div><div> <br></div><div>end do </div><div><br></div><div><br></div><div>  delete(xpt)</div><div>  delete(ypt)</div><div> ; delete(aod)</div><div><br></div><div>end do</div><div>  gsn_labelbar_ndc(wks,dimsizes(cnlevels)+1,cnlevels,0.30,0.30,res_lb) <br></div><div>                                         <br></div><div>   frame(wks)                                         </div><div>end<br></div><div><br></div><div><br></div><div>Any help would be appreciated.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Qudsia</div><div><br></div><div><br></div><div><br></div></font></span></div></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist,  </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>   </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</div>