{ // Example of text produced with PostScript illustrating how to use // the various text control characters, national accents, sub and superscripts gROOT->Reset(); TCanvas c1("c1","PostScript examples",100,10,600,700); pad1 = new TPad("pad1","The pad with the function",0.05,0.50,0.95,0.95,21); pad2 = new TPad("pad2","The pad with the histogram",0.05,0.05,0.95,0.45,21); pad1->Draw(); pad2->Draw(); pad1->cd(); ps = new TPostScript("psexam.ps",-111); title = new TPaveLabel(.2,.9,.8,.95,"Printed text with PostScript"); title->SetFillColor(16); title->Draw(); pt2 = new TPaveText(.1,.1,.9,.4); pt2->SetFillColor(18); pt2->SetTextSize(0.04); pt2->AddText("100 `m#m x 100 `m#m"); pt2->AddText("| a&^`\256#! \267 b&^`\256#! | = `\345# a^i?jk!+b^kj?i"); pt2->AddText("i ('d#?`m!y#&^\261!`g^m#! + m `y#&^\261! = 0' r# (~r# + m^2!)`y# = 0"); pt2->AddText("L?em! = e J^`m#?em! A?`m#! , J^`m#?em!=l&^\261!` g?m#!l , M^j?i! = `\345&?a#! A?`a! t^a#j?i! "); pt2->Draw(); pad2->cd(); h1f = new TH1F("h1f","Test random numbers ",200,-10,10); h1f->SetFillColor(45); h1f->SetXTitle("100 `m#m x 100 `m#m"); h1f->FillRandom("gaus",10000); h1f->Draw(); c1->Update(); c1->Update(); ps->Close(); gSystem->Exec("gv psexam.ps&"); }