Superimposing 2 TGraphs with different scales

Dear pyroot experts,

I would like to superimpose 2 TGraphs with different scales in pyroot.

I found a nice example in ROOT tutorial : see for example :
slac.stanford.edu/BFROOT/www … woGraphs.C
It works nicely with my root setup :
/afs/cern.ch/atlas/software/releases/16.6.0/sw/lcg/app/releases/ROOT/5.26.00e_python2.6/i686-slc5-gcc43-opt/root

When simply converting this examples in pyroot, I am answered :
TCanvas::DrawFrame:0: RuntimeWarning: Drawframe must be called for the current pad only

I attached my pyroot macro.
The offending line is obviously the line 22. Do you understand why it works in ROOT but not in pyroot?

Is there any solution?

Many thanks in advance for your help,

Benjamin Trocmé
ATLAS Grenoble
2graphs.py (1.71 KB)

Hi,

the warning is there for root.exe as well, so no difference:root [0] Processing superImposeTwoGraphs.C... Warning in <TCanvas::DrawFrame>: Drawframe must be called for the current pad only root [1] .q
I don’t know what the warning means, though.

Cheers,
Wim

Hello Wim,

Thanks for your feedback. I indeed did not notice this in C.
I was just confused by the fact that in pyroot the 2nd graph did not appear; one just needs to update the canvas to see the 2nd graph (whereas it is not needed in C).

Just a stupid beginner error.

Regards

Benjamin