Save As canvas.C

Suzanne Panacek (spanacek@fnal.gov)
Tue, 20 Jul 1999 09:09:53 -0500


Hi,
I am trying to save a canvas as a macro and it does not quite work as I
expected.

I have one histogram displayed on the canvas and do a "Save As canvas.C". The
resulting macro is:

{
//=========Macro generated from canvas: c1/c1
//========= (Tue Jul 20 08:56:37 1999) by ROOT version 2.22/04
TCanvas *c1 = new TCanvas("c1", "c1",75,-6,700,500);
c1->Range(-10.15,-56.7,7.35,510.3);
c1->SetFillColor(19);
c1->SetBorderSize(2);

htemp->Draw("");
c1->Modified();
c1->cd();
}

because htemp is undefined it gives an error and quits. How can I tell the
canvas to include saving the variables it needs to draw the contents?

Suzanne Panacek