Dear rooters,
I like very much using pyroot with histograms (displayed interactive by jsroot) in jupyter.
import ROOT
%jsroot on
Recently I have found a new stuff - “Voila”. Something that can convert jupyter notebook (using widgets) to a simple web application.
BUT
I cannot get the picture of the updated histogram.
I want to fill/display a histogram inside a callback function like def on_button_clicked(b)
if I do
with output:
%matplotlib widget
zs.speread( filename, hretu ,1 , tfrom, tto)
his=zs.TH1_to_plt( hretu )
fig,ax=plt.subplots(figsize=(12,8))
ax.plot( *zip(*his))
plt.show()
I get an interactive histogram (poor quality in comparison to JSROOT). When I try this:
with output:
zs.speread( filename, hretu ,1 , tfrom, tto)
canvas1=ROOT.TCanvas("cc","",800,800)
canvas1.Draw()
canvas1.cd(0)
hretu.Draw("")
canvas1.Draw()
I get a jsroot histogram in jupyter, BUT nothing in Voila
The following piece of code -outside the callback- displays JSROOT nicely, but hretu is not updated later on, after callback calls:
canvas2=ROOT.TCanvas("c11","",800,800)
hretu.Fill(1000)
hretu.Draw()
canvas2.Draw()
Does anybody have an experience how to get JSROOT into Voila game? Thank you, Jaromir