Mar-31-2018, 03:31 AM
Hello everyone!
So I have been searching for some time to an answer. What I want to do is: Make 2 histograms, Divide them->Plot the result.
For some reason I can't find an answer..
So h1 and h2 are in this case 5x5 dimensional arrays, h3 is aswell. Now I want to plot a new histogram with the same binning as h1 and h2 but with the values in h3.. Should not be to difficult right? I could use pyROOT or something for this but I switched to python for the easiness in plotting so going back to ROOT kind of makes no sense in this case..
Kind Regards Steven
So I have been searching for some time to an answer. What I want to do is: Make 2 histograms, Divide them->Plot the result.
For some reason I can't find an answer..
x = [1,2,3,1,2,3,1,2,3] y = [1,2,3,2,3,1,3,1,2] plt.figure() plt.subplot(221) h1, x1, y1,im1 = plt.hist2d(x,y, bins=[5,5]) plt.subplot(222) h2, x2, y2,im2 = plt.hist2d(x,y,bins=[5,5]) h3 = h1/h2
So h1 and h2 are in this case 5x5 dimensional arrays, h3 is aswell. Now I want to plot a new histogram with the same binning as h1 and h2 but with the values in h3.. Should not be to difficult right? I could use pyROOT or something for this but I switched to python for the easiness in plotting so going back to ROOT kind of makes no sense in this case..
Kind Regards Steven