*** Chris Jillings wrote : > > 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" > Hi Chris, I normally use the "save as" option from the canvas menu and then select .eps to save my plots. When I then lateron use LaTeX together with the epsfig.sty everything works correctly. Cheers, _/_/ _/ _/ _/_/_/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/_/_/_/ _/ _/ *----------------------------------------------------------------------* Dr. Nick van Eijndhoven Department of Subatomic Physics email : nick@fys.ruu.nl Utrecht University / NIKHEF tel. +31-30-2532331 (direct) P.O. Box 80.000 tel. +31-30-2531492 (secr.) NL-3508 TA Utrecht fax. +31-30-2518689 The Netherlands WWW : http://www.fys.ruu.nl/~nick Office : Ornstein lab. 172 ---------------------------------------------------------------------- tel. +41-22-7679751 (direct) CERN PPE Division / ALICE exp. tel. +41-22-7675857 (secr.) CH-1211 Geneva 23 fax. +41-22-7679480 Switzerland CERN beep : 13+7294 Office : B 160 1-012 *----------------------------------------------------------------------*
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:32 MET