how can I do something like this in ROOT?
value on x-axis 0.0 1.0 2.0 3.0 4.0
I tried by filling the histograms with the points and the errors, put them into a stack, and draw with the hbar option (that rotates the histogram), but that just results in the attached plot, which shows bars going from 0 and up, while I really want just exactly what is shown in this simple illustration.
use a TGraphErrors and set the errors along y to zero
Thanks for your reply.
What I need is a set of points with errors that are displayed vertically over each other. Where the y-axis represents the different measurements, and the x-axis represents the measurement point with errors.
I can’t see how setting the error-bar on the y-axis (I presume you now mean on the y-axis of the original TH1F histogram?) to zero will help this?
I attach some pseudo-code showing what I have done up until now. (it is in python, but that does not matter)
""" iterating over a dictionary containing the values
I use in the histograms
for region,est in sorted(summary_dict.items()):
This produces something like the attached plot. But I would like it rotated 90 degrees. In addition I would like to be able to draw the mean value out of the points. There should exist some tool for all this? (of course, I can easily calculate the mean value it myself, but I just wonder if something is already in place for these types of things)
By the way, I see I have done this unnecessarily complicated, but that is due to have started with TGraph, and placing the various graphs vertically above each other, but then switching to TH1F and going horizontal again, and trying to use hbar to rotate the result.