<div dir="ltr"><div><div><div><div><div><div>Hi, <br><br></div>It looks like you want to adjust your NDC coordinates for the legend. You can add this call right before your call to draw:<br><br> drawNDCGrid(wks)<br><br></div>It will help with determining appropriate NDC coords.  (You also have to add this load command at the top:<br><br></div>  load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl&quot;<br><br></div>If you want nice left-justified labels within the legend columns, you could add this resource:<br><br></div>   res@txJust = &quot;LeftCenter&quot;<br><br><br></div><div>All that said, you may not have enough room in the existing bottom margin to plot your legend, in which case you&#39;ll want to push your map upwards on the page;  see the examples at <br><br>  <a href="http://ncl.ucar.edu/Applications/viewport.shtml">http://ncl.ucar.edu/Applications/viewport.shtml</a><br><br></div><div>for how to adjust the &quot;viewport&quot;.<br><br></div><div>Finally, as for the black line, that&#39;s coming from NCL&#39;s map database. To turn it off, I *think* its:<br><br><br></div><div>  res@mpOutlineOn = False<br><br></div><div>I hope that helps...<br></div><div>Rick<br><br></div><div><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 4, 2015 at 2:57 PM, Jesús Garcia Rosales <span dir="ltr">&lt;<a href="mailto:jesus21gr@gmail.com" target="_blank">jesus21gr@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"><div>Hi users,</div><div>I have a problem with the position of my stations names and the map( look the image). Additionally I would like to eliminate the black line in the map and only visualize the shape file, I don&#39;t know how to do that. Please help me!, Thank for your time.</div><div><br></div><div>My script is the next:</div><div><br></div><div><div><br></div><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><br></div><div>begin</div><div>  latN = -10.5</div><div>  latS = -14.0</div><div>  lonL  = -77.</div><div>  lonR  = -73.</div><div><br></div><div>  ; Coordenadas de cada estación que se quiere ubicar</div><div><br></div><div>  lat=(/-12.04, -10.69, -11.4, -11.33, -12.25, -12.12, -11.4, -11.75, -11.88, -11.62, \</div><div>        -11.78, -12, -12.16, -12.38, -12.35, -12.58, -12.78, -12.98, -13.06, -12.84/)</div><div><br></div><div>  lon=(/-75.32, -76.26, -76.33, -76.4, -75.36, -75.43, -75.69, -75.13, -75.27, -75.01,\</div><div>        -75.47, -75.22, -75.23, -74.85, -75.08, -75.24, -75.01, -74.72, -74.14, -74.57/)</div><div><br></div><div><br></div><div><br></div><div><br></div><div>  wks = gsn_open_wks(&quot;x11&quot;,&quot;graficas/estaciones&quot;)</div><div><br></div><div>  res                             = True</div><div>  res@gsnFrame                    = False   ; So we can draw markers</div><div>  res@gsnMaximize                 = True    ; affects ps, eps, pdf only</div><div>  res@gsnPaperOrientation         = &quot;portrait&quot;  ; force portrait</div><div><br></div><div>  res@tiMainString                = &quot;Ubicacion de las estaciones&quot;</div><div><br></div><div><br></div><div>  res@mpMinLatF                   = latS     ; range to zoom in on</div><div>  res@mpMaxLatF                   = latN</div><div>  res@mpMinLonF                   = lonL</div><div>  res@mpMaxLonF                   = lonR</div><div>  res@mpCenterLonF                = (lonL+lonR)*0.5</div><div>  res@mpBottomPointLatF           = 100</div><div><br></div><div><br></div><div>  res@mpFillOn                    = False</div><div>  res@mpOutlineDrawOrder          = &quot;PostDraw&quot;</div><div>  res@mpFillDrawOrder             = &quot;PreDraw&quot;</div><div>  res@mpOutlineBoundarySets       = &quot;GeophysicalAndUSStates&quot;</div><div>  res@mpUSStateLineColor          = &quot;White&quot;       ;  &quot;Gray10&quot;</div><div>  res@mpUSStateLineDashPattern    = 5</div><div>  res@mpGridAndLimbOn = False</div><div><br></div><div><br></div><div>  res@pmTickMarkDisplayMode       = &quot;Always&quot;</div><div>;</div><div>; Draw the map (frame won&#39;t get advanced because gsnFrame was set to False).</div><div>;</div><div>  yres = True                            ; panel resource list</div><div>  yres@gsnMaximize = True                ; maximize the plots</div><div>  yres@gsnPaperOrientation  = &quot;portrait&quot; ; set paper orientation to portrait</div><div>  yres@gsnPanelYWhiteSpacePercent = 5.0 </div><div><br></div><div><br></div><div>  map = gsn_csm_map(wks,res)</div><div><br></div><div><br></div><div><br></div><div> ;gsn_panel(wks,map,(/1,1/),yres)</div><div>; Draw markers on the plot in the lat/lon locations.</div><div>;</div><div>  colors = (/&quot;black&quot;,&quot;RoyalBlue&quot;,&quot;Yellow&quot;,&quot;antiquewhite3&quot;,&quot;darkolivegreen1&quot;,&quot;burlywood4&quot;,\</div><div>            &quot;olivedrab&quot;,&quot;palevioletred&quot;,&quot;PaleGreen&quot;,&quot;Wheat&quot;,&quot;Brown&quot;,&quot;cadetblue&quot;,&quot;darkorchid&quot;,\</div><div>            &quot;darkorchid4&quot;,&quot;deepskyblue3&quot;,&quot;forestgreen&quot;,&quot;chartreuse3&quot;,&quot;chartreuse&quot;,&quot;darkgoldenrod2&quot;,&quot;chocolate2&quot;/)</div><div>  labels = (/&quot;Huayao&quot;,&quot;Cerro de Pasco&quot;,&quot;Marcapoma&quot;,&quot;Yantac&quot;,&quot;Laive&quot;,&quot;Jarpa&quot;,&quot;Tarma&quot;,&quot;Comas&quot;\</div><div>           ,&quot;Ingenio&quot;,&quot;Ricran&quot;,&quot;Jauja&quot;,&quot;Santa Ana&quot;,&quot;Viques&quot;,&quot;Pampas&quot;,&quot;Pilchaca&quot;,&quot;Huancalpi&quot;\</div><div>            ,&quot;Huancavelica&quot;,&quot;Lircay&quot;,&quot;Quinua&quot;,&quot;Acobamba&quot;/)</div><div><br></div><div>; Manually specify location of legends</div><div>        </div><div>  xleg = (/0.15,0.15,0.15,0.15,0.15,0.35,0.35,0.35,0.35,0.35,0.56,0.56,0.56,0.56,0.56,0.80,0.80,0.80,0.80,0.80/); Location of</div><div>  xtxt = (/0.22,0.225,0.225,0.225,0.225,0.42,0.44,0.44,0.44,0.44,0.65,0.66,0.66,0.66,0.66,0.88,0.88,0.88,0.88,0.88/)  ; legend markers</div><div>  yleg = (/0.20,0.17,0.14,0.11,0.08,0.20,0.17,0.14,0.11,0.08,0.20,0.17,0.14,0.11,0.08,0.20,0.17,0.14,0.11,0.08/)   ; and text</div><div>  ytxt = (/0.20,0.17,0.14,0.11,0.08,0.20,0.17,0.14,0.11,0.08,0.20,0.17,0.14,0.11,0.08,0.20,0.17,0.14,0.11,0.08/)  ; strings.</div><div><br></div><div>  mkres               = True</div><div>  mkres@gsMarkerIndex = 17     ; Filled circle</div><div>  mkres@gsMarkerSizeF = 0.06    ;0.03</div><div><br></div><div>  txres               = True</div><div>  txres@txFontHeightF = 0.013</div><div><br></div><div><br></div><div><br></div><div><br></div><div>; add location and text for each station</div><div><br></div><div>  do i = 0,19</div><div>     mkres@gsMarkerColor = colors(i)</div><div>     gsn_polymarker(wks,map,lon(i),lat(i),mkres)</div><div>     gsn_polymarker_ndc(wks,xleg(i),yleg(i),mkres)</div><div>     gsn_text_ndc      (wks,labels(i),xtxt(i),ytxt(i),txres)</div><div>  end do</div><div><br></div><div> ;Abriendo el archivo .shp</div><div>cuenca_mantaro_shp_name = &quot;/home/usuario/Escritorio/alan/cuencas/UH.shp&quot;</div><div><br></div><div>  lnres                  = True</div><div>  lnres@gsLineColor      = &quot;red&quot;</div><div>  lnres@gsLineThicknessF = 2 </div><div><br></div><div>can_id = gsn_add_shapefile_polylines(wks,map,cuenca_mantaro_shp_name,lnres)</div><div><br></div><div><br></div><div><br></div><div><br></div><div>  draw(map)</div><div>  frame(wks)</div><div>end</div></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></div>