I have one macro that creates 4 different canvas, the last two canvas are respectively a canvas with one graph and a canvas with two graph, the code is as follows:
auto Histogram_canvas_fitted=new TCanvas("Histogram_canvas_fitted","Histogram_canvas_fitted",800,800);
Histogram_canvas_fitted -> cd(1);
h2_fit->Draw("lego");
Histogram_canvas_fitted->Draw();
auto canvas_xy_fit=new TCanvas("canvas_xy_fit","canvas_xy_fit",800,800);
canvas_xy_fit->Divide(2);
canvas_xy_fit->cd(1);projh2X->Draw();
canvas_xy_fit->cd(2);projh2Y->Draw();
The problem is that when I open the canvas and click on SetTextAttributes to add the fitting parameters at the statistical box it works only for the last two graphs in the last canvas and not for the first one; how can I solve this? Thanks in advance.