Hi Rene,
thanx for your reply and sorry for being late,
for some reason I forgot to let me notify on
your reply…
the shortes script would be:
void test()
{
TH1F* hist = new TH1F(“hist”, “MyTitle”, 10, 0., 10.);
//fill hist
for(Int_t i=0; i<10; ++i){
hist->Fill(i, i);
}
//draw hist to file
TCanvas *canv = new TCanvas(“canv”, “MyCanvas”, 800, 600);
TPostScript psFile(“test.ps”, 112);
//type 111 portrait
// 112 landscape
// 113 eps
//psFile.Range(28,35); //for 2X2 histos per page
psFile.NewPage();
canv->cd(1);
hist->GetXaxis()->SetTitle(“MyAxisTitle”);
hist->GetXaxis()->SetTitleColor(1.);
hist->Draw();
canv->Update();
canv->Close();
psFile.Close();
}
i’m using root 3.10/03.
if i run it interactively starting root and typing
.x test.C
everything is fine.
if i run it in with
root -b -q test.C
it results in a flush of errors of this kind:
…
Error in TTF::SetTextSize: current font index out of bounds
Error in TTF::SetTextFont: font file times.ttf not found in path
…
and the resulting ps file contains no single letter.
hope you can help me with this.
Cheers Roger