Bounding box on eps and ps files

Chris Jillings (chris@sno.phy.queensu.ca)
Tue, 7 Apr 1998 11:00:44 -0400 (EDT)


Hello all,
I am trying to use root-generated graphics in a LaTeX document.
I get the following error for both .eps and .ps files. Note that ghostview
reads the files just fine.

! LaTeX Error: Cannot determine size of graphic in c1.ps (no BoundingBox).

My macros is below. Thanks

Chris

//
// A root macro to read in a .root file and make a 1-d histo
// based with cuts.
//
int cjj_e8a()
{
gROOT->Reset();
gStyle->SetOptFit(1);
gStyle->SetStatX(0.45);
gStyle->SetStatY(0.85);

TCanvas* c1 = new TCanvas("c1","Ntuple Plots",1); // create canvas
c1->SetFillColor(kWhite);

TFile* f1 = new TFile("cjj_e8.root","READ");
TH1F* hi1 = new TH1F("hi1","Angular Resolution: Electron KE = 8 MeV ",80,-1.0,1.0);
hi1->SetXTitle("Cos`q#");
// h509->Draw("Angres>>hi1","Egen>4&&Rfitt<600","goff");
h509->Draw("(Ue*Uft+Ve*Vft+We*Wft)>>hi1","Rfitt<600","goff");
c1->SetLogy(1);
TF1* expExp = new TF1("expExp",expExp,0,1,4);
expExp->SetParameters(7,0.01,1,35000);
expExp->SetParNames("1st slope","2nd Amp","2nd slope","scale fac");

TPostScript ps("cjj_e8a.eps",114);
hi1->Fit("expExp","R");
c1->Update();
ps.Close();


return 0;
}

#include "expExp.C"

=================================================================
= =
= Chris Jillings =
= Department of Physics phone/voice mail: (613) 545-6000x4805 =
= Queen's University fax: (613) 545-6813 =
= Kingston, Ontario email: chris@sno.phy.queensu.ca =
= Canada, K7L 3N6 web: http://snodaq.phy.queensu.ca =
= =
=================================================================