RE: [ROOT] Empty postscript files

From: Philippe Canal (pcanal@fnal.gov)
Date: Mon Mar 29 2004 - 18:28:09 MEST


Hi Marc,

Please note that you should not use
	gROOT->Reset();
within a function.  It should be used only at the start on
an unamed macro.  

Cheers,
Philippe

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Marc de Kamps
Sent: Monday, March 29, 2004 1:48 AM
To: roottalk@pcroot.cern.ch
Subject: [ROOT] Empty postscript files


Hi,

Both macros below create empty ps files.
This is 3.10/02 under win2000 (win32gdk version).
What to do ?

Thanks,
	Marc



void Plot()
{
	gROOT->Reset();

	TCanvas c1;

	TPostScript ps("Beautiful_histo.ps",111);
	TH1F h1("h1","wysiwyg",100,0,1);
	h1.Fill(0.5,1);
	h1.Draw();
	
	c1.Update();

	ps.Close();
}

void DumpCanvas()
{
	gROOT->Reset();

	TCanvas c1;

	TH1F h1("h1","wysiwyg",100,0,1);
	h1.Fill(0.5,1);
	h1.Draw();
	
	c1.Update();

	c1.Print("Equally_beautiful_histo.ps");
} 



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET