Hi NCLers,
I just noticed that when I am drawing bar charts using gsnXYBarChart, there is a horizontal offset of half a bin-size if I turn on the outline-only option. I don't know if this is documented or not, but I didn't see it on the site, and it isn't the expected behavior.
Example script below makes a plot of the bar chart with outline only turned on in black, then the regular bar chart in red, and then just the data points as blue markers. My output plot as a pdf from NCL 6.0 is also attached.
.brian
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
Y = genNormalDist(0, 10, False)
X = Y@x
wks = gsn_open_wks("pdf", "Test_Outlines")
res = True
res@vpHeightF = 0.25
res@gsnDraw = False
res@gsnFrame = False
res@gsnXYBarChart = True
res@gsnXYBarChartOutlineOnly = True
plot = gsn_csm_xy(wks, X, Y, res)
res@gsnXYBarChartOutlineOnly = False
res@xyLineColor = "red"
pltovr = gsn_csm_xy(wks, X, Y, res)
overlay(plot, pltovr)
res@gsnXYBarChart = False
res@xyMarkLineMode = "Markers"
res@xyMarkerColor = "blue"
res@xyMarker = 1
pltovr2 = gsn_csm_xy(wks, X, Y, res)
overlay(plot, pltovr2)
draw(plot)
frame(wks)
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.1.8 : Mon Jan 23 2012 - 12:45:14 MST