Plot different number of entries

Hallo rooters,

I’ve got two trees with different number of entries I want to plot together in a TH1. My values are generated by a measuring system. My first tree contains the voltage values and my second tree contains the amperage values.

The measuring system records the voltage in a time step which is a bit smaller than the step of the amperage. So I get a different number of entries, but the time-range is the same. In my plot the amperage-range is too short when I plot both trees togehter.

Is there any method where I can “stretch” the binx-length?

Thanks! :slight_smile:

BTW. I don’t know how you fill your histograms, but you could also directly modify/scale the “x” value when you call the TH1::Fill method.

Thank you for the link!

I fill my hist with the TH1::Fill method, so this is a good point. I’ll try it.