<div dir="ltr">Hi Debasish,<div>Yes, it is possible. I use gsn_histogram to bin my data for me, but then I manually use gsn_csm_xy to draw the bars. This method gives me greater control over the plot than if I had used gsn_histogram to plot. Here is a sample of my coding:</div><div><br></div><div>  hres = True     <br>  hres@gsnDraw = False<br>  hres@gsnFrame = False<br><br>  hres@gsnHistogramBinIntervals = fspan(-.1,.1,41)<br>  plot = gsn_histogram(wks,model_runtrend,hres)<br>  aa_h = plot@NumInBins*1.<br>  aa_h!0 = "time"<br>  aa_h&time = fspan(-.0975,.0975,40)     ; these are the midpoint values of the bins set above in gsnHistogramBinIntervals<br>  delete([/plot/])<br>  if (min(model_runtrend).le.min(hres@gsnHistogramBinIntervals).or.max(model_runtrend).gt.max(hres@gsnHistogramBinIntervals)) then   ; make sure values are not outside bin range<br>     print("AA trends outside histogram bin range, adjust bin range")<br>     printMinMax(model_runtrend,0)<br>     exit<br>  end if<br></div><div><br></div><div>  bres = True<br>  bres@gsnDraw = False<br>  bres@gsnFrame = False<br>  bres@gsnYRefLine = 0.0<br>  bres@gsnXYBarChart = True</div><div>  bres@gsnXYBarChartColors = "red"<br>  bres@trYMinF = 0.0<br>  bres@trXMinF = -.1<br>  bres@trXMaxF = .1<br>  bres@tmXBMode = "Explicit"<br>  bres@tmXBValues = fspan(-.1,.1,5)<br>  bres@tmXBLabels = bres@tmXBValues<br>  bres@tmXBMinorValues = fspan(-.2,.2,17)<br></div><div>  bplot = gsn_csm_xy(wks, aa_h&time, aa_h, bres)<br></div><div><br></div><div>Hope that helps!</div><div>Adam</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 11, 2020 at 11:54 PM Debasish Hazra 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>Hi,</div><div>Is there a way to do xy plot with size bins on xaxis without doing pdfx in NCL ? Attached is ncl script that reads output using pdfx. But wondering without using pdfx, can NCL be used to draw bins specified in xaxis. Uploaded output file in ftp server. Any help on this is appreciated. <br></div><div><br></div><div>Thanks</div><div>Debasish<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></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>