Canvas is not showing

_ROOT Version: 6.14
_Platform: Ubuntu 16.04
_Compiler: GCC 5.4

I am compiling my code Example7.C (2.9 KB) using this Makefile.txt (1.1 KB). The compilation goes without any warning or error. But when I am running the executable file, its runs with no error. But at lust its showing
Info in TCanvas::MakeDefCanvas: created default TCanvas with name c1
But the canvas is not showing.
Can anyone please help me with this problem ?
Thank you.

I guess your program just run fine and creates a canvas but it close it when it finishes.
You can add some code to wait before finishing or print the canvas in a pdf or png file (gPad->Print), or convert your program in a macro and run it from the root prompt.

Thanks a lot for helping. It worked. :grinning:

Which of my suggestions did you choose ?

I added gPad->Print() in my code.

I also tried running it from root prompt and. It worked there too. Can you suggest the change you were talking about to add some code to wait before finishing?

You can add some C code waiting some keyboard input.

Thanks. I should have thought that.

But its still not showing the canvas in this way.

ROOT Forum -> Search -> “gSystem->ProcessEvents();”

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