Re: Superimposing without drawing

From: Christophe Delaere <christophe.delaere_at_cern.ch>
Date: Tue, 5 Sep 2006 15:08:24 +0200


Hi Stan,

Another solution is to use the option "groff" when drawing. This will suppress the graphical output as does the batch mode, but it only apply to one command, so you are free to produce an output somewhere else in your code.

Christophe.

On Tuesday 5 September 2006 14:06, Stan Seibert wrote:
> On Sep 5, 2006, at 6:23 AM, Adam Roe wrote:
> > {
> > TCanvas *c1 = new TCanvas("testgraph","testgraph");
> > TH1F *graph1 = new TH1F("graph1", "graph1", 10, -5, 5);
> > graph1->FillRandom("gaus", 100);
> > TLine *line1 = new TLine(-3,0,-3,30);
> > TLine *line2 = new TLine(3,0,3,30);
> > line1->SetLineColor(6);
> > line2->SetLineColor(6);
> > c1->cd();
> > graph1->Draw();
> > line1->Draw("SAME");
> > line2->Draw("SAME");
> > c1->Print("graph1.gif");
> > }
> >
> > What I would like to do is somehow skip the Draw() portion and
> > simply print the canvas, with no output to the screen.
>
> If you run ROOT with the -b (for "batch mode") option, it will not
> draw anything to the screen, but still generate the GIF file. That
> should speed things up.
>
> ---
> Stan Seibert

-- 
Christophe DELAERE
CERN fellow
office: 28 1-030
phone : 74307
e-mail: christophe.delaere_at_cern.ch
Received on Tue Sep 05 2006 - 15:07:45 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:00 MET