How to move the fit statistics to another TPad

Hello everyone! I currently have my canvas divided into three TPads, where in TPad 1 I plot the graph, TPad2 I plot my control graph where I do the fit and TPad3 where the legend and the fit stats box are plotted. What happens is that I can even get the fit statistic box to be plotted in TPad3, but it is still plotted in TPad 2. When I used to use it with histogram, at the end, I just deleted it from the histogram and that was it. But in TGraphErrors I can’t do that. Could someone please give me a suggestion for a solution?

ROOT Version: 6.14.06


plot_single_scan.C (4.6 KB)

plot_utils.C (2.9 KB)

I looked at you macro and I see you have the right solution to move stat but I cannot run your macro because of:

root [0] 
Processing plot_single_scan.C...
In file included from input_line_9:1:
/Users/couet/Downloads/plot_single_scan.C:1:10: fatal error: 'plot_utils.C' file not found
#include "plot_utils.C"

I have uploaded the plot_utils.C already.
Thanks!

I am surprised you get some plot because your macro gives me:

plot_single_scan.C:108:37: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
    TPaveStats* temp = (TPaveStats*)stats1->Clone();
                                    ^~~~~~

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