<div dir="ltr"><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Dear NCL experts,</div><div><font size="4"><br></font></div><div><b><font size="4">[Details]</font></b></div><div>I  want to plot a histogram with the number of grid points in the y-axis and rainfall classification in the x-axis.</div><div>The attached figure is an example of what I wanted (Desired_output.gif).</div><div><br></div><div>The data that I am using can be downloaded from this link:</div><div><a href="https://www.dropbox.com/s/lbkjlqgq9era5c7/APHRO_AMJ_1979-2015.nc?dl=0">https://www.dropbox.com/s/lbkjlqgq9era5c7/APHRO_AMJ_1979-2015.nc?dl=0</a><br></div><div><br></div><div><b><font size="4">[What I have so far]</font></b></div><div>The following is the script that I am using:</div><div><br></div><div>;***********************************************************<br>;This script creates a histogram of the number of gridpoints<br>;with rainfall above 0 mm/day<br>;Created by Lyndz<br>;<a href="mailto:olagueralyndonmark429@gmail.com">olagueralyndonmark429@gmail.com</a><br>;*******************************************************</div><div>begin</div><div>fo = addfile("APHRO_AMJ_1979-2015.nc","r")<br>rain=fo->precip(:,:,:)<br>rain_region=rain(:,{12.5:22},{120:122.5})<br><b>test=ndtooned(rain_region)</b><br>;*************************************<br>;Plots histogram<br>;*************************************<br>  wks = gsn_open_wks("png","output")             ; send graphics to PNG file<br>  gsn_define_colormap(wks,"temp1")              ; choose colormap<br>  res                                 = True<br>  res@gsnHistogramSelectNiceIntervals = False   ; intervals now float<br>  res@gsnHistogramComputePercentages  = True    ; change left axis to %<br>  res@gsnHistogramClassIntervals = (/0,1,5,10,15,20,25,30,25,40,45/)<br>  res@gsnHistogramComputePercentagesNoMissing = True<br>  res@tmXBPrecision = 2         ; set the precision to 2 significant digits<br>  res@tmYLFormat = "#^se"       ; don't use "e" symbol, always show +/-<br>  res@tiXAxisString   = "Rainfall[mm/day]"<br>  res@tiYAxisString   = "Number of Grid Points"<br>  plot=gsn_histogram(wks,test,res)                 ; create histogram with 10 bins<br>end<br></div><div><br></div><div><b><font size="4">[Issues/Problems]</font></b></div><div>[1] The script runs fine. The output is attached (output.png). I am not sure if  I plotted this correctly. After using ndtooned, I just plotted the histogram. Is there a way to check if the y-axis is really the number of gridpoints or the x axis is the rainfall class?</div><div>Or is there a way to invoke that the y-axis is the number of gridpoints when plotting the histogram?</div><div><br></div><div>I'll appreciate any help with this.</div><div><br></div><div>Sincerely,</div><div>Lyndz</div><div><br></div></div></div></div></div></div></div></div></div></div></div>