Hello All,
I have, for e.g. 2 canvases, cn1
and cn2
, stored in different ROOT files i.e., cn1.root
and cn2.root
. Both canvases have multiple elements, e.g. TGraphErrors, TLegend, TPaveText
, etc. I want to take these full canvases and plot them side-by-side on a new canvas.
It could be easy but did never try. Could you please provide a simple macro to do that?
Thanks a lot!
{
TFile *f = new TFile("cn1.root");
TCanvas *c= (TCanvas *)f->Get("cn1");
TList *l=c->GetListOfPrimitives();
TH2D *h = (TH2D*)l->FindObject("histo");
TCanvas c2;
h->Draw("col")
}
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.