Hi,
I have two 1D histograms in a macro. I want to make a 2D histogram using these 1D histograms by taking h1 on the x-axis and h2 on the y-axis.
How would I do this.
Hi,
I have two 1D histograms in a macro. I want to make a 2D histogram using these 1D histograms by taking h1 on the x-axis and h2 on the y-axis.
How would I do this.
Your question is not very clear.
I guess you want the X and Y axis of the 2D histograms equal to h1 Axis et H2 X axis.
You have all the getters in the TH1 class to retrieve these values …
But then what a out the bin contents ? …
You can not do that. Start with the values (x|y) = (0, 1), (1,1), (0, 1). In your head, fill two 1D histograms, and then try to create the 2D histogram that corresponds to the original values and you’ll see why
Axel.
I posted an example of two different 2D histograms that produce similar 1D histograms, demonstrating that this is not possible. I thought it might be relevant / educational here.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.