Hi,
I’ve run into an issue with parsing of the TGraphPainter
options that only appears when using the python ROOT bindings in Juypter notebook with the enableJSVis
feature on. ROOT version 6.10/02.
It seems that the options are not parsed correctly and that the "PLC"
option specifically is parsed twice, once with the intended meaning and secondly as the meaning of each letter individually. I’ve checked using the native ROOT interpreter, in python standalone and without the enableJSVis()
, in all these cases the plot renders as expected.
import numpy
import ROOT
ROOT.enableJSVis()
xValues = numpy.array([0,1,2,3,4,5,6,7,8,9], dtype=numpy.float64)
yValues1 = numpy.array([0,1,2,3,4,5,6,7,8,9], dtype=numpy.float64)
yValues2 = numpy.array([9,8,7,6,5,4,3,2,1,0], dtype=numpy.float64)
yValues3 = numpy.array([6,2,8,3,5,1,9,7,4,0], dtype=numpy.float64)
gr = ROOT.TMultiGraph()
gr.Add(ROOT.TGraph(len(xValues), xValues, yValues1))
gr.Add(ROOT.TGraph(len(xValues), xValues, yValues2))
gr.Add(ROOT.TGraph(len(xValues), xValues, yValues3))
canvas = ROOT.TCanvas("canvas","")
gr.Draw("A L PLC")
canvas.Draw()
This image shows that the "P"
and "C"
opions have been enabled:
Thanks