Dear ROOT experts,
I am seeing some strange behavior of errorbars when using ROOT.gROOT.SetWebDisplay()
. I want to have Poisson errorbars, so I use the option histo.SetBinErrorOption(ROOT.TH1.kPoisson)
, which leads to Poisson errorbars, when I draw the histogram and save the canvas as a png while ROOT.gROOT.SetWebDisplay()
is commented out. However, when I want to view the histogram in an interactive web display instead of a png file the displayed errorbars are not Poisson errorbars anymore. Here is a minimal example:
import ROOT
import numpy as np
ROOT.gROOT.SetWebDisplay()
ROOT.EnableThreadSafety()
ROOT.EnableImplicitMT()
ROOT.gEnv.SetValue("WebGui.HttpThreads", 150)
ROOT.TH1.AddDirectory(False)
ROOT.gStyle.SetOptStat("e")
histo = ROOT.TH1F("histo", "histo", 20, -5, 5)
histo.SetBinErrorOption(ROOT.TH1.kPoisson)
for i in range(10):
histo.Fill(np.random.normal())
canvas = ROOT.TCanvas("canvas", "Canvas", 800, 600)
histo.Draw("E0")
canvas.Update()
canvas.Draw()
Is there a way to display the histogram in the interactive webbrowser with Poisson errorbars?
Many thanks in advance.
Rebecca
_
ROOT Version: 6.32.02
Platform: Not Provided
Compiler: Not Provided