Cannot draw when I doesn't using root prompt


Please read tips for efficient and successful posting and posting code

ROOT Version: v6 (git clone from and it is the latest)
Platform: Ubuntu18.04
Compiler: g++ & cmake


Hi, I am a new user of root, I want to draw something using TCanvas. I use the member function Draw() of TCanvas.

I compile the code instead of root prompt. It compiled well, but when I want to run it, it didn’t show anytime and even have errors. However, when I run it in root prompt, it can show the graph. I am curious about it. Could you help me about it? Thank you!

BTW, I can creat a pdf and print the graph in this pdf file. So maybe it is the problem about Draw()?

Hi @jiangxkjohn ,
and welcome to the ROOT forum.

Please see Standalone C program runs without error but doesn't display histogram - #2 by eguiraud and I draw a canvas with no picture, they should help.

Cheers,
Enrico

1 Like

Thank you! It works well!

1 Like

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