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("png","bar1h") ; Open "bar1h.png" png file. gsn_merge_colormaps(wks,"BlWhRe","default") ; Merge two color maps. res = True ; Plot options desired. res@gsnDraw = False ; Turn off draw/frame b/c we want res@gsnFrame = False ; to attach stuff to plot first. res@vpXF = 0.15 ; Move slightly to left res@vpWidthF = 0.8 ; Change aspect ratio of plot. res@vpHeightF = 0.44 res@trXMinF = 0 ; Set X and Y axes limits. res@trXMaxF = 7 res@trYMinF = -4.8 res@trYMaxF = 1 res@gsnXYBarChart = True res@gsnYRefLine = 0. ; Reference line, necessary ; for bar chart. res@gsnXYBarChartBarWidth = 0.5 ; Change bar widths res@tiYAxisString = "Radiative Forcing " + \ "(Watts per square meter)" res@tiYAxisFontHeightF = 0.015 res@tiYAxisOffsetXF = -.017 ; Move Y label toward plot. res@tmXBOn = False ; Turn off top, bottom, res@tmXTOn = False ; and right tickmarks. res@tmYROn = False res@tmYLLabelFontHeightF = 0.015 ; Font sizes res@tmYLLabelDeltaF = -0.5 ; Scoot towards plot. res@tmYLPrecision = 1 ; No zeros after decimal res@xyLineThicknessF = 3 ; 3x as thick. res@xyLineColors = (/"red","blue"/) ; Above/below colors plot = gsn_csm_xy(wks,ispan(1,6,1),arr,res) ; Create the plot, but ; don't draw it. l1dum = new(5,graphic) ; Dummy variables for adding polylines. l2dum = new(5,graphic) l3dum = new(5,graphic) tdum = new(9,graphic) ; Dummy variable for adding text strings. lres = True ; Polyline mods desired lres@gsLineColor = "black" ; Color of lines lres@gsLineThicknessF = 2.5 ; Thickness of lines time = fspan(1,5,5) colors = (/"darkgreen","darkgreen","darkgreen","darkgreen","darkgreen"/) do ii = 0,4 lres@gsLineColor = colors(ii) l1dum(ii) = gsn_add_polyline(wks,plot,(/time(ii),time(ii)/), \ (/minval(ii),maxval(ii)/),lres) l2dum(ii) = gsn_add_polyline(wks,plot,(/time(ii)-.08,time(ii)+.08/), \ (/maxval(ii),maxval(ii)/),lres) l3dum(ii) = gsn_add_polyline(wks,plot,(/time(ii)-.08,time(ii)+.08/), \ (/minval(ii),minval(ii)/),lres) end do ; ; Add some text strings inside the plot. ; tres = True tres@txFontHeightF = 0.015 ; Font height tdum(0) = gsn_add_text(wks,plot,"CO~B~2~N~",1,-3.,tres) tdum(1) = gsn_add_text(wks,plot,"CH~B~4~N~ + N~B~2~N~O",2,-.97,tres) tdum(2) = gsn_add_text(wks,plot,"Mineral Dust",3,-2.4,tres) tdum(3) = gsn_add_text(wks,plot,"Continental ice",4,-4.35,tres) tdum(4) = gsn_add_text(wks,plot,"+ sea level",4,-4.6,tres) tdum(5) = gsn_add_text(wks,plot,"Vegetation",5,-1.77,tres) tdum(6) = gsn_add_text(wks,plot,"Orbital",6,0.45,tres) draw(plot) ; Drawing the plot will now draw everything attached frame(wks) ; to it. Don't forget to advance the frame! end