Open jblomer opened 8 months ago
(Hold on, mixed up the reproducer, fixing...)
Can you add ROOT.gROOT.SetWebDisplay("chrome")
to the macro?
For me it works ok.
Ok, now the reproducer is the correct one. Adding SetWebDisplay("chrome")
doesn't help (also it is already on Chrome).
It also does not work with SetWebDisplay("off")
.
Canvas destroyed before it can be drawn.
I have idea to provide special TCanvas::Draw()
handling for python - but never find time for this.
This is a blocker for the web graphics.
This is a blocker for the web graphics.
It is not.
Normal graphics is also not working with this macro. TCanvas just destroyed at the end of the function
Right, thanks for pointing this out!
I suggest a change to the documentation (e.g., this page: https://root.cern/manual/python/#interactive-graphics) that mentions that the canvas is better not in function-local scope but in global scope.
One can use ROOT.SetOwnership(c, False)
at the end of such function - as in tutorials/dataframe/df103_NanoAODHiggsAnalysis.py
. This prevent PyROOT from canvas destroying at the end
Check duplicate issues.
Description
When using Python in interactive mode, the web window does not launch properly (see screenshot). It works from a C++ macro. One can also save canvas contents in ROOT batch mode.
Reproducer
Output:
ROOT version
master
Installation method
From sources
Operating system
Linux
Additional context
No response