load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" begin arr = (/-2.22,-0.54,-1.4, -3.,-1.2,0.1/) ; Data for bars. minval = (/-2.6, -0.68, -2., -4.,-1.4/) maxval = (/-1.87,-0.4, -1.,-1.9,-1.0/) wks = gsn_open_wks("ps","bar1c") ; Open "bar1c.ps" PS file. res = True ; Plot options desired. res@gsnXYBarChart = True res@gsnYRefLine = 0. ; Reference line, necessary ; for bar chart. res@gsnXYBarChartBarWidth = 0.5 ; Change bar widths res@xyLineThicknessF = 3 ; 3x as thick. ; ; All the bars above the reference line are considered one curve, ; and all bars below are considered another curve. Hence, the ; first color ov xyLineColors will apply to the above bars, and ; the second color to the below bars. ; res@xyLineColors = (/"red","blue"/) plot = gsn_csm_xy(wks,ispan(1,6,1),arr,res) ; Create and draw an XY plot. end