<div dir="ltr"><div>Hi Zilore,</div><div><br></div><div>The specific error with ispan is that the function takes integers, not floats:</div><div><br></div><div> lats = ispan(-31,-28,1)</div><div><br></div><div>There is an fspan function if that's what you really want; it behaves a bit differently:</div><div><br></div><div> <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/fspan.shtml">https://www.ncl.ucar.edu/Document/Functions/Built-in/fspan.shtml</a></div><div><br></div><div>More to your question, I'm not expert with labelling axes, so I always have to experiment. If fixing the ispan() error doesn't get you the labels you want, you might look at the examples on tickmarks for how to custom label axes:</div><div><br></div><div> <a href="https://www.ncl.ucar.edu/Applications/tickmarks.shtml">https://www.ncl.ucar.edu/Applications/tickmarks.shtml</a></div><div><br></div><div>Hope that helps...</div><div>Rick<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Apr 9, 2023 at 1:59 AM Zilore Mumba via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>My script,figure attached, outputs one longitude and one latitude labels only. In the code snippet below, I have turned on gridlines and they draw ok. <br></div><div>>From this script <a href="https://www.ncl.ucar.edu/Applications/Scripts/mapgrid_6.ncl" target="_blank">https://www.ncl.ucar.edu/Applications/Scripts/mapgrid_6.ncl</a> I was guessing that I could put latitude and longitudes labels using the code reproduced below. This gives me the error (lats = ispan(-31.,-28.,1.) "fatal:ispan: arguments must be of an integral type, can't continue"</div><div>How does one get customized lat/lon labels?<br></div><div><br></div><div> res@mpGridAndLimbOn = True ; turn on grid lines<br> res@mpGridSpacingF = 0.5<br><br> ;---Create lat/lon arrays for location of latitude labels.<br> ;lats = ispan(-31.,-28.,1.)<br> ;nlat = dimsizes(lats)<br> ;lons = new(nlat,integer)<br> ;lons = 0<br><br> ;---Resources for text strings<br> ;txres = True<br> ;txres@txFontHeightF = 0.015<br> ;dum = gsn_add_text(wks,plot,""+lats,lons,lats,txres)<br></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>