You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If configuring any web display, gPad is not properly set.
As a result, h.Draw creates new canvas.
Code works properly when gROOT.SetWebDisplay("off") invoked.
Reproducer
Here is reproducer:
import ROOT
ROOT.gROOT.SetWebDisplay("")
c = ROOT.TCanvas()
if ROOT.gPad:
print("gPad name", ROOT.gPad.GetName(), "editable", ROOT.gPad.IsEditable())
else:
print("gPad is not there - why?")
h = ROOT.TH1D("","",64, -4,4)
h.FillRandom("gaus")
# this is a problem - histogram do not "see" gPad and creates new canvas
h.Draw()
input("Press Enter to exit")
ROOT version
master branch
Python 3.11.9
Installation method
build from source
Operating system
OpenSUSE linux
Additional context
No response
The text was updated successfully, but these errors were encountered:
{
gROOT->SetWebDisplay("");
auto c = new TCanvas();
if (gPad)
printf("gPad name %s editable %d\n", gPad->GetName(), gPad->IsEditable());
else
printf("gPad is not there - why?\n");
auto h = new TH1D("","",64, -4,4);
h->FillRandom("gaus");
// this is a problem - histogram do not "see" gPad and creates new canvas
h->Draw();
}
I just not understand how gPad can differ in h.Draw.
Are there any special pythonization for it?
Or is there other thread? gPad is thread-local variable.
Check duplicate issues.
Description
If configuring any web display, gPad is not properly set.
As a result,
h.Draw
creates new canvas.Code works properly when gROOT.SetWebDisplay("off") invoked.
Reproducer
Here is reproducer:
ROOT version
master branch
Python 3.11.9
Installation method
build from source
Operating system
OpenSUSE linux
Additional context
No response
The text was updated successfully, but these errors were encountered: