How to redefine canvas type (web/root)?

Dear Experts,

From py python-based applicaiton I’d like to redefine ROOT canvas type (Web/Root)

##  some python code 

some_root_object = ...

some_root_object.Draw()  ## here...

#

Is there a simple way to change the to/from Web-based/Rot based canvas type?
I see a way to change it via “$HOME/.rootrc” file , but it is noe very suitable for my purposes.
Are there alternative ways (except for “$HOME/.rootrc” file) ways to control the type of canvas,
e.g. environment variables or (better) explicit call for some ROOT functions?

Thank you very much in advance for the hints.


Please read tips for efficient and successful posting and posting code

Please fill also the fields below. Note that root -b -q will tell you this info, and starting from 6.28/06 upwards, you can call .forum bug from the ROOT prompt to pre-populate a topic.

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


Is there a simple way to change the to/from Web-based/Rot based canvas type?

ROOT.gROOT.SetWebDisplay("off");

or

ROOT.gROOT.SetWebDisplay("");

It will not changing type of already shown canvas.

Thank you, Sergey @linev !
a tiny follow-up question:
can one choose i a similar way the browser type e.g. chrome vs firefox?
Thank you very much in advance!

Yes, firefox and chrome are reserved words.

ROOT.gROOT.SetWebDisplay("chrome");

But browser should be installed on the system and properly detected during ROOT compilation.

See TROOT::SetWebDisplay() docu

Thank you very much!

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