PyROOT in MacOS drawing the Canvas but not the histogram

Hello ! I have a student currently trying to run a PyROOT script (in attachment), which basically takes a TTree from a file (here) and draws a simple histogram from the TTree.

The problem is that the Canvas is drawn but no histogram is drawn. If we run the same code but in C++ (also in attachment), everything works properly.

She installed ROOT using Homebrew and the rest of the script works fine, it’s just the actual drawing the histogram part that doesn’t work. Has this been observed before ?

ROOT Version: 6.22.08
Platform: MacOS 11.4
Python version: 3.9.5
Compiler: Clang 12.0.0

RootTutorial1.cc (610 Bytes)
RootTutorial1.py (794 Bytes)

Add an Update() :

[...]
  t.Draw("px>>h_px")
  ROOT.gPad.Update()
  input("Press q to exit program (and say goodbye to your beautiful histogram)...")
[...]

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