# Canvas not displayed while executing the macro hsum.C on MacOS

**URL:** <https://root-forum.cern.ch/t/canvas-not-displayed-while-executing-the-macro-hsum-c-on-macos/30788>\
**Category:** ROOT\
**Created:** [September 23, 2018, 2:33pm UTC](https://root-forum.cern.ch/t/canvas-not-displayed-while-executing-the-macro-hsum-c-on-macos/30788 "2018-09-23T14:33:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vciulli](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/v/9f8e36/32.png) [@vciulli](https://root-forum.cern.ch/u/vciulli)\
**Post date:** [September 23, 2018, 2:33pm UTC](https://root-forum.cern.ch/t/canvas-not-displayed-while-executing-the-macro-hsum-c-on-macos/30788/1 "2018-09-23T14:33:39Z")

</div>

* * *

_ROOT Version:_ 6.14/04  
_Platform:_ MacOS High Sierra 10.13.6 OsX 10.13  
_Compiler:_ clang91

* * *

I would like to draw an histogram while it is filling up as it is done in the tutorial hist/hsum.C  
However while this is working on linux, it is not on macOS, as the Canvas is only displayed when the macro ends.  
Is there any possible solution to this?

By the way, can you suggest me the best way to slow down the filling, which is too fast? (to be sure that the Canvas was not displayed I have added an interrupt in the macro, requesting some dummy user input)

Thanks,  
Vitaliano

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [September 23, 2018, 3:15pm UTC](https://root-forum.cern.ch/t/canvas-not-displayed-while-executing-the-macro-hsum-c-on-macos/30788/2 "2018-09-23T15:15:16Z")

</div>

After each `c1->Update();` add one or two calls: `gSystem->ProcessEvents();`

---

<div class="post-metadata">

**Author:** ![vciulli](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/v/9f8e36/32.png) [@vciulli](https://root-forum.cern.ch/u/vciulli)\
**Post date:** [September 23, 2018, 5:45pm UTC](https://root-forum.cern.ch/t/canvas-not-displayed-while-executing-the-macro-hsum-c-on-macos/30788/3 "2018-09-23T17:45:22Z")

</div>

Thanks!  
After this fix it works nicely!  
V.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [October 7, 2018, 5:45pm UTC](https://root-forum.cern.ch/t/canvas-not-displayed-while-executing-the-macro-hsum-c-on-macos/30788/4 "2018-10-07T17:45:26Z")

</div>

Closed on October 7, 2018, 5:45pm UTC

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