x = (/1,1,1,2,2,3,3,3,3,3,4,4,4,5,5,5,5,6,8,9,9,9,10/) ; 18 values total wks = gsn_open_wks("x11","histo") ; 9 bars of values 3,2,5,3,4,1,0,1,4 res = True res@tiMainString = str_join(""+x,",") ;---Let gsn_histogram pick the bin intervals to use. plot=gsn_histogram(wks,x,res) ;---Specify the bin intervals to use. res@gsnHistogramBinIntervals = (/1,5,8,10/) ; 3 bars of values 13, 5 and 5 plot = gsn_histogram(wks,x,res) ;---Count the number of values exactly equal to a value, rather than a range of values. delete(res@gsnHistogramBinIntervals) res@gsnHistogramDiscreteBinValues = ispan(1,5,1) plot = gsn_histogram(wks,x,res)