Save histo to graphics without Canvas?

Is it possible to export a histogram to a PNG (or any other graphics format) without using a canvas or anything related to graphics libraries?

I have a script which I like to let run on a terminal server over several days, analyzing thousands of data files and plotting the results in graphics files. I can not use X11, because I can not export display etc…

thanks!
:mrgreen:

Before creating any canvas, call (which is the same as executing “root -b”, try also “root -?”):
gROOT->SetBatch(kTRUE); // c++ macro
import ROOT; ROOT.gROOT.SetBatch(ROOT.kTRUE); # python macro

thanks for the quick reply. I am going to check it.
btw. I see I have posted in the wrong forum.
Sorry. This would have been a general question.