I have two trees which I want to Draw on the same graph. The trees have been
created with different programs. The second tree has a subset of variables of
the first tree.
On the Y axis I have a variable and I plot it versus a string. When I plot one
tree on top of another it seems like the second one is plotted with respect to
the entry number rather than the actual string value. How can I fix this?
I attach the code and the data I am using. I run it as: root -l commands.C
Thank you
_ROOT Version: ROOT 6.12/04 Platform: CentOS Linux release 7.4.1708 64 bit Compiler: gcc version 4.8.5 20150623
Yes, I agree that the labels are not exactly the same for the 2 trees. But some labels are the same in both trees. I would expect that Draw plots something in the case the labels coincide.
For instance, the following labels are present in both trees:
Labels are only string attached to bins. When you overlap the histograms like you do the bins are mapped one to one not taking into account the labels value. To make sure the labels match you will need to create two histograms (before drawing the trees) with exactly the same labels in X, then in the Draw command you draw inside the histograms using the >> operator