When using the JSVis in Jupyter with a Python 2 notebook I’ve run into an unexpected behavior with zoom with the mouse wheel. The zoom in works as expected (the scale moves an equal about on both the left and right, up and down), but when zooming out it appears that the higher valued side (right and up) moves faster than the lower valued side (the lower value side may not be changing at all). This feels odd and is not the same behavior as when using a linear scaling. I’ve attached a couple screenshots, but t doesn’t do it justice, I suggest you try to attached script yourself.
Is this a problem with ROOT or with some visualization system that ROOT is built upon? It makes it rather jarring when zooming in and out and I frequently find my self resting the zoom and then trying to zoom in again to the region of interest.
Zoomed in (two mouse wheel clicks):
Zoomed out (two mouse wheel clicks):
import numpy import ROOT ROOT.enableJSVis() logBins = numpy.logspace(-2,1,num=200) h = ROOT.TH2D("h","H",len(logBins)-1, logBins, len(logBins)-1, logBins) for i in range(5000): h.Fill(numpy.fabs(ROOT.gRandom.Gaus()), ROOT.gRandom.Gaus()) canvas = ROOT.TCanvas("canvas","Canvas") canvas.SetLogx() canvas.SetLogy() h.Draw("COLZ") canvas.Draw()