I am trying to use the functionality of drawing candle plots from a TTree, but it seems I do not understand how they work.
If you TTree::Draw(“y:x”,"",“candle”), this will bin the x and y data, but instead of making a normal TH2D, each x-bin will have a candle showing the statistics of the y coordinates for the points in that bin. So if I specify 10 x bins, I should get 10 vertical candles laid out side-by-side showing the ranges/quartiles and such of the y values.
What ROOT is giving me:
I don’t really know. It seems to put the x values on a vertical axis, draws TWO candles, one for “y” and one for “x”. The drawing/framing is also messed up, it doesn’t seem to fit on the pad.
Attached are two screenshots of what I get when I do these two (pyroot) commands:
t.Draw("pressure:time") # th2.png t.Draw("pressure:time","","candle") # candle.png
I’ve also attached the .root file that contains the TTree “environment” with the branches named above.
I’m using ROOT 5.34/36 on OSX 10.11, and PyROOT on python 2.7.
environment.root (654 KB)