Labels in Histograms

Hi there,
i have a stupid question. I want to draw a label into a histogram and print all that into
an eps file.
I use a function that basically looks like that::


TPostScript psFile(filename, 113);

psFile.NewPage();
canv->cd ( 1 );
canv->SetLeftMargin ( 0.20 );
canv->SetRightMargin ( 0.15 );
canv->SetBottomMargin ( 0.15 );
canv->SetTopMargin ( 0.05 );
dat[ n ]->SetTitle();

//xaxis
dat[ n ]->GetXaxis()->SetTitle( xtitle );
dat[ n ]->GetXaxis()->SetTitleSize ( 0.06 );
dat[ n ]->GetXaxis()->SetTitleColor ( 1. );
dat[ n ]->GetXaxis()->SetTitleOffset ( 1.1 );
dat[ n ]->GetXaxis()->SetTitleFont ( 62. );
dat[ n ]->GetXaxis()->SetLabelSize ( 0.045 );
dat[ n ]->GetXaxis()->SetLabelFont ( 62. );

//yaxis
dat[ n ]->GetYaxis()->SetTitle( ytitle );
dat[ n ]->GetYaxis()->SetTitleSize ( 0.06 );
dat[ n ]->GetYaxis()->SetTitleColor ( 1. );
dat[ n ]->GetYaxis()->SetTitleOffset ( 1.0 );
dat[ n ]->GetYaxis()->SetTitleFont ( 62. );
dat[ n ]->GetYaxis()->SetLabelSize ( 0.045 );
dat[ n ]->GetYaxis()->SetLabelFont ( 62. );

//histogram & function
dat[ n ]->SetLineColor ( 1 );
dat[ n ]->SetLineWidth ( 3 );
dat[ n ]->SetMarkerStyle( 20 );
dat[ n ]->SetMarkerSize ( 1.3 );
fnc[ 0 ]->SetLineWidth ( 3 );
fnc[ 0 ]->SetLineColor ( 4 );
fnc[ 1 ]->SetLineWidth ( 3 );
fnc[ 1 ]->SetLineColor ( 4 );
dat[ n ]->DrawCopy ( “e” );

TPaveLabel* text = new TPaveLabel(0.5, 0.6, 0.9, 0.7, “N(D*) = 122 #pm 15”);
text->SetFillStyle(4000);
text->Draw(“same”);

TLegend* leg = new TLegend(0.5,0.7,0.9,0.9);
leg->SetFillStyle ( 0 );
leg->SetFillColor ( 0 );
leg->SetBorderSize ( 0 );
leg->AddEntry( dat[ n ], “entry 1”, “P” );
leg->AddEntry( fnc[ 1 ], “entry 2”, “L” );
leg->Draw ( “same” );

canv->RedrawAxis( );
canv->Update ( );
canv->Close ( );
psFile.Close ( );
delete canv;


in principle a very basic action. But if i draw the histogram first the PaveLable is not drawn
and if i draw the PaveLable first the histogram is totally outof scope. What is my problem?

Cheers
Roger

Your macro doesn’t run. Send me a a running version in order to help you further.