[ncl-talk] Histogram using "gsn_csm_xy" res at gsnXYBarChartOutlineOnly = True

Joowan Kim joowan at ucar.edu
Sun Feb 8 13:48:54 MST 2015


Dear NCL experts

I'm drawing histogram using, gsn_csm_xy.
It is very useful for me as it support drawing only outline of the
histogram, res at gsnXYBarChartOutlineOnly = True

But I found this option shifts the histogram half of dx (bin size).
Is it only my problem or designed like that on purpose?
I'm using ncl v6.2.0 in MacOS.

please see my testing example below
Any comment will be helpful for me!

Thanks

----------------------------
s = random_normal(0,3,2000)
r = True
r at bin_max =  5.
r at bin_min = -5.
y = pdfx(s,10,r)
x = y at bin_center

w = gsn_open_wks("eps","bar2")
o = True
o at gsnDraw  = False
o at gsnFrame = False
o at gsnXYBarChart = True
p1 = gsn_csm_xy(w,x,y,o)
o at gsnXYBarChartOutlineOnly = True
o at xyLineColor = "red"
p2 = gsn_csm_xy(w,x,y,o)
overlay(p1,p2)
draw(p1)
frame(w)

print("CAUTION: gsnXYBarChartOutlineOnly = True shifts the histogram...")
----------------------------


-- 
Joowan Kim
Atmospheric Chemistry Division
National Center for Atmospheric Research
PO Box 3000  Boulder, CO 80307
e-mail : joowan at ucar.edu
           joowan.k at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150208/e16bad91/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bar2.eps
Type: application/postscript
Size: 43050 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150208/e16bad91/attachment.eps 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bar2.ncl
Type: application/octet-stream
Size: 446 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150208/e16bad91/attachment.obj 


More information about the ncl-talk mailing list