TH1 transpose axes


I have a script which produces two histograms, a TH2 and a TH1, where the data of the TH1 is the Y-axis of the TH2. The histograms are filled as:

h_1D->Fill(funct); h_2D->Fill(Energy,funct);
I wonder if there is a way to transpose the TH1 so that the data “funct” appears on the Y-axis? I wish to have my two histograms plotted side-by-side eg. canvas->Divide(2,1), and would prefer to avoid any scaling/ratio issues by doing this with the image afterwards.


so you have to plot the h1 as a bar chart horizontally ?

Yes, that’s what I’m after.

For that you can use the HBAR option described here: … .html#HP10