Different styles for different canvases

Dear root experts,

I’d like to set an individual style for each canvas produced by macros.
I tried to create different TStyle objects, but the last one seems overwrite prvious[1].
Namely, I’d like to set “gStyle->SetPadRightMargin(X);” for each canvas.

Thanks in advance,

TStyle *newStyle1 = new TStyle(“forCanvs1”, “forCanvs1”);
c = new TCanvas(“c”, “c”, 960, 720);

Yes there is one single Style (gStyle) active at a time …

But you don’t need TStyle for that, c->SetLeftMargin(0.02) should do, see the doc at https://root.cern.ch/doc/master/classTAttPad.html#a52c2352a0f4d03f9875af9791d7ed965


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