Superimpose two TF1


I have two TF1 functions which I want to draw in the same plot, but the scales are very different. Is there an option for TF1 to rescale one function to fit the other’s range? So far I haven’t found anything for TF1, only histograms. There is already a topic with the same question from 2014, but it wasn’t solved. So maybe anyone has an idea how this can be accomplished? :slight_smile:

You can also draw the first plot with a scale fitting the TF1 range … or change the function by applying a scaling factor on it. An example reproducing your issue would be better to help you. Also when you refer to “a same question from 2104” it is better to put a link to it.

I apply the scaling factor, but this only affects the y-axis. I still have the x axis to scale somehow.

The link: How to superimpose two TF1 with different scales

Can you provide a small example showing what you are doing ?


test.C (803 Bytes)

test.C (571 Bytes)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.