Writing TCanvas to file BUT NOT to screen

Dear reader,

How could I write a TCanvas to a file without having it also put on screen? I would like to store histograms in nice canvases but since I am working via a (sometimes not too fast) ssh connection I rather avoid them being put out on my screen. I rather fetch them from file afterwards.

Best,

Ytsen de Boer.
rootsupport at yrdeboer point NetherLands

You can:

  1. start root with the option “-b” (for “batch”).
  2. execute a macro which creates a canvas. (no graphics window will appear).
  3. generate a PS file with: gPad->Print(“a.ps”);

Hi Olivier,
is it possible the same for PDFs, SVGs?

Regards. Valeriy

Valeriy,

Yes, this is possible. ps, svg and pdf use the same interface TVirtualPS.
These files can be generated from a ROOT batch session.

Rene