Image does not show in pop up canvas


I installed ROOT 6 on python 2.7. It works very well. I tested with simple plots, they showed up on screen as I expected. Then, I tried to run a simple test on python by creating the, it worked as well. When I plotted a histogram with python ( The canvas pops up on my screen but it showed nothing. Do you have any experience with it? How should I fix it?

Please read tips for efficient and successful posting and posting code

ROOT Version: 6.23
Platform: Not Provided
Compiler: Not Provided

Welcome to the forum!

It really depends on what is in your script. And you forgot to tell which platform you’re working on

Thanks for replying.
Sorry to forget to tell a platform. I am using a macOS Catalina.

The script just simple test ::
from ROOT import *

his = TH1F(“his”, “histogram”, 100, -5, 5)




from ROOT import TH1F, gPad, gSystem
his = TH1F("his", "histogram", 100, -5, 5)
# gPad.Modified(); gPad.Update() # maybe
gSystem.ProcessEvents() # 1
gSystem.ProcessEvents() # 2 (maybe)

Thanks so much. It works now. How “gSystem.ProcessEvents()” work and why I have to do it twice?

Maybe calling it once will be sufficient (sometimes two calls are required).

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