<div dir="ltr">Hi Geeta,<div>To fix the Y-axis:<br>res@tmYLMode = "Explicit"</div><div>res@tmYLValues = ispan(1,18,1)</div><div>res@tmYLLabels = res@tmYLValues ; or, depending on how you want the formatting to be, tostring(res@tmYLValues)<br><div><br></div></div><div>For the Y-axis:<br>Make sure res@tmXBMode = "Explicit" is set. If it is, then the values you are specifying in res@tmXBValues are likely not within the range of the values of the array <span style="font-size:13px;color:rgb(38,40,42);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif">1000*profile(:,Fix_</span><span style="font-size:13px;color:rgb(38,40,42);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif">NSCAN,153:193)).</span></div><div><span style="font-size:13px;color:rgb(38,40,42);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif">To check, do this (after setting res@tmXBValues):</span></div><div><span style="font-size:13px;color:rgb(38,40,42);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif">printMinMax(res@tmXBValues,0)</span></div><div><span style="font-size:13px;color:rgb(38,40,42);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif">printMinMax(</span><span style="font-size:13px;color:rgb(38,40,42);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif">1000*profile(:,Fix_</span><span style="font-size:13px;color:rgb(38,40,42);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif">NSCAN,153:193)) ,0)</span></div><div><span style="font-size:13px;color:rgb(38,40,42);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif"><br></span></div><div><span style="font-size:13px;color:rgb(38,40,42);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif">The two arrays ranges should overlap. If they do not, then the labels will not show up. </span></div><div><span style="font-size:13px;color:rgb(38,40,42);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif"><br></span></div><div><span style="font-size:13px;color:rgb(38,40,42);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif">If you continue to have issues please include your revised script, along with the results of the prinMinMax statements above and respond to the ncl-talk email list.</span></div><div><span style="font-size:13px;color:rgb(38,40,42);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif">Adam</span></div><div><span style="font-size:13px;color:rgb(38,40,42);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif"><br></span></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 28, 2021 at 8:25 AM Geeta Geeta <<a href="mailto:geetag54@yahoo.com">geetag54@yahoo.com</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><div style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px"><div><div dir="ltr">Thanks for your mail Sir. <br></div><div dir="ltr">I rectified/ added the following for Y axis. <br></div><div dir="ltr"><br></div><div dir="ltr"><div> res@trXAxisType = "IrregularAxis"<br>; res@trXMinF = 0<br>; res@trXMaxF = 40<br> res@trYMinF = 0.5<br> res@trYMaxF = 18.0<br><br></div><div dir="ltr">For X axis ----</div><div dir="ltr"><br></div><div dir="ltr"> <br></div><div dir="ltr"><div>res@tmXBValues = (/longr(Fix_NSCAN,Fix_NP+20),longr(Fix_NSCAN,Fix_NP+16),longr(Fix_NSCAN,Fix_NP+12),longr(Fix_NSCAN,Fix_NP+08),longr(Fix_NSCAN,Fix_NP+04),longr(Fix_NSCAN,Fix_NP),longr(Fix_NSCAN,Fix_NP-04), longr(Fix_NSCAN,Fix_NP-08),longr(Fix_NSCAN,Fix_NP-12), longr(Fix_NSCAN,Fix_NP-16),longr(Fix_NSCAN,Fix_NP-20)/)<br> res@tmXBLabels = (/longr(Fix_NSCAN,Fix_NP+20),longr(Fix_NSCAN,Fix_NP+16),longr(Fix_NSCAN,Fix_NP+12),longr(Fix_NSCAN,Fix_NP+08),longr(Fix_NSCAN,Fix_NP+04),longr(Fix_NSCAN,Fix_NP),longr(Fix_NSCAN,Fix_NP-04), longr(Fix_NSCAN,Fix_NP-08),longr(Fix_NSCAN,Fix_NP-12), longr(Fix_NSCAN,Fix_NP-16),longr(Fix_NSCAN,Fix_NP-20)/)<br><br></div><div dir="ltr">Y axis is plotted and also shows 0.5, 1.5, 2.5 etc. How can I make it uniform say 1, 2, 3..... and so on. <br></div><div dir="ltr"><br></div><div dir="ltr">Reg X axis, I specified both res@tmXBValues and res@tmXBlabels (same) but it is not shown in the plot. <br></div><div dir="ltr">Plot attatched</div><div dir="ltr">thanks again<br></div><div dir="ltr"><br></div></div></div><div dir="ltr"><br></div><div><br></div><div>Geeta.</div></div>
<div><br></div><div><br></div>
</div><div id="gmail-m_-762665197137175504yahoo_quoted_0358602325">
<div style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;color:rgb(38,40,42)">
<div>
On Monday, 26 April, 2021, 9:13:56 pm IST, Adam Phillips <<a href="mailto:asphilli@ucar.edu" target="_blank">asphilli@ucar.edu</a>> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="gmail-m_-762665197137175504yiv9670604782"><div><div dir="ltr">Hi Geeta,<div>1 - Very minor, but you do not need to set gsnSpreadColors = True, as that is the default. </div><div>2 - You are not setting trXMinF/trXMaxF/trYMinF/trYMaxF, which sets the minimum/maximum x-axis values, and minimum/maximum y-axis values shown on the plot. You stated that the y-axis is elongated; if you mean it continues past a value of 18, try setting trYMaxF = 18.</div><div>3 - When you set tmXBMode = "Explicit", the range of x-axis values specified in the 2nd input to gsn_csm_contour (in your case, 1000*profile(:,Fix_NSCAN,153:193)) needs to overlap with your settings of tmXBValues. If those two settings do not overlap, the X-axis labels will not be visible. Verify that those two settings overlap.</div><div><br clear="none"></div><div>Hope that helps! If you have further questions please respond to the ncl-talk email list.</div><div>Adam </div></div><br clear="none"><div><div id="gmail-m_-762665197137175504yiv9670604782yqt86265"><div dir="ltr">On Sun, Apr 25, 2021 at 9:03 AM Geeta Geeta via ncl-talk <<a rel="nofollow noopener noreferrer" shape="rect" href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br clear="none"></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:Helvetica,Arial,sans-serif;font-size:13px"><div><div dir="ltr">Hi. <br clear="none"></div><div dir="ltr">I am unable to put labels on the Xaxis inspite to specifying tm@XBValues and res@XBLabels. and the Ya xis is elongated<br clear="none"></div><div dir="ltr"><br clear="none"></div><div dir="ltr">request someone to help me. I am attaching the figure so obtained. <br clear="none"></div><div dir="ltr">Following are the res in the code. <br clear="none"></div><div dir="ltr"><div><div><br clear="none"></div><div><br clear="none"></div><div> res@tmXBMinorOn = False</div>150 res@tmYLMinorOn = False<br clear="none">151 res@tmYLMode = "Explicit"<br clear="none">152 res@tmYLValues = Ht_of_layers<br clear="none">153 res@tmYLLabels = Ht_of_layers<br clear="none">154 ; defining X axis for all the plts together<br clear="none">155 Fix_NSCAN = 1036<br clear="none">156 Fix_NP = 173<br clear="none">157 xaxismin = Fix_NP+20<br clear="none">158 xaxismax = Fix_NP-20<br clear="none">159 xaxisinterval = 1<br clear="none">160 int_for_plot = 4<br clear="none">161 <br clear="none">162 xaxis_fnl = ispan(xaxismin,xaxismax,xaxisinterval)<br clear="none">163 print(xaxis_fnl)<br clear="none">164 xaxis_for_plotting = ispan(xaxismin,xaxismax,int_for_plot)<br clear="none">165 printVarSummary(xaxis_for_plotting)<br clear="none">166 print(xaxis_for_plotting)<br clear="none">167 <br clear="none">168 res@tmXBMode = "Explicit" ; will change from case to case<br clear="none">169 ; res@tmXBValues = xaxis_for_plotting<br clear="none">170 res@tmXBValues = (/longr(Fix_NSCAN,Fix_NP+20),longr(Fix_NSCAN,Fix_NP+16),longr(Fix_NSCAN,Fix_NP+12),longr(Fix_NSCAN,Fix_NP +08),longr(Fix_NSCAN,Fix_NP+04),longr(Fix_NSCAN,Fix_NP),longr(Fix_NSCAN,Fix_NP-04), longr(Fix_NSCAN,Fix_NP-08),longr(Fix_NSCAN,Fix_NP-12), longr(Fix_NSCAN,Fix_NP-16),longr(Fix_NSCAN,Fix_NP-20)/)<br clear="none">171 res@tmXBLabels = (/longr(Fix_NSCAN,Fix_NP+20),longr(Fix_NSCAN,Fix_NP+16),longr(Fix_NSCAN,Fix_NP+12),longr(Fix_NSCAN,Fix_NP +08),longr(Fix_NSCAN,Fix_NP+04),longr(Fix_NSCAN,Fix_NP),longr(Fix_NSCAN,Fix_NP-04), longr(Fix_NSCAN,Fix_NP-08),longr(Fix_NSCAN,Fix_NP-12), longr(Fix_NSCAN,Fix_NP-16),longr(Fix_NSCAN,Fix_NP-20)/)<br clear="none">172 <br clear="none">173 <br clear="none">174 print(res@tmXBLabels)<br clear="none">175 print(res@tmXBValues)<br clear="none">176 ; res@tmXBLabels = decimalPlaces(restmXBLabels,2,True)<br clear="none">177 <br clear="none"><br clear="none"></div><div><br clear="none"></div></div><div><br clear="none"></div><div>Geeta.</div></div></div></div>_______________________________________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow noopener noreferrer" shape="rect" href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow noopener noreferrer" shape="rect" href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div></div><br clear="all"><div><br clear="none"></div>-- <br clear="none"><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font style="background-color:inherit" color="#888888">Adam Phillips <br clear="none"></font></span></div><span><font style="background-color:inherit" color="#888888">Associate Scientist, </font></span><span><font style="background-color:inherit" color="#888888">Climate and Global Dynamics Laboratory, NCAR<br clear="none"></font></span></div></div><div><span><font style="background-color:inherit" color="#888888"><a rel="nofollow noopener noreferrer" shape="rect" href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> </font></span><span><font style="background-color:inherit" color="#888888">303-497-1726 </font></span></div><span><font style="background-color:inherit" color="#888888"></font></span><div><div><span><font style="background-color:inherit" color="#888888"><br clear="none"></font></span><div><span><font style="background-color:inherit" color="#888888"><a rel="nofollow noopener noreferrer" shape="rect" 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></div></div>
</div>
</div></div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" 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>