Use THStack make stack histogram

hello experts
im using THStack to make stack histogram. the code is in attachment. but seems it doesnt look like a filled stack hist as i expected, also the color is not showed as i set it to be, idk where is wrong? thank you!
my hist:


what do i expect:

code:

stackhis.py (1.1 KB)

Try

ths1.Draw("hist")

or

ths1.Add(m1,"hist")
#...
ths1.Add(m2,"hist")
#...
ths1.Draw()
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.