Dear Michal, Try putting gStyle->SetPadTopMargin(.2); at the beginning of your macro. Look at http://www.phenix.bnl.gov/~markp/root/attribut.htm for a comparison with some typical paw commands for setting histogram attributes. The link http://ganp03.in2p3.fr/nof/paw2root.shtml had a similar more detailed comparison but it appears not to be working anymore. Regards, - Mark Pollack -----Original Message----- From: owner-roottalk@hpsalo.cern.ch [mailto:owner-roottalk@hpsalo.cern.ch] On Behalf Of lijowski@cosray2.wustl.edu Sent: Monday, September 14, 1998 10:38 AM To: roottalk@hpsalo.cern.ch Subject: Tick mark labels Hello, Below is a macro which illustrates the problem. In the original plot 10^4 are hidden behind the plots titles. In order to see I have to move the plots title by hand to the right. In this particular case I don't even see 4. Regards, Michal Lijowski P.S. Fons and Rene, would be better for you if I hold my questions until the mid-October? ------------------------------------------------------------------------ Michal Lijowski Washington University Research Associate St. Louis, MO 63130-4899, USA Department of Physics phone: 314-935-6285 Campus Box 1105 email: lijowski@cosray2.wustl.edu ------------------------------------------------------------------------ { //Reset ROOT gROOT->Reset(); gBenchmark->Start("test_ps_2a"); // Int_t type = 111; Int_t type = 112; // Int_t type = 113; Int_t nentries = 6280; Float_t xx[nentries], yy1[nentries], yy2[nentries]; xx[0] = -3.1415; yy1[0] = sin(xx[0]) * 1.0E+06 + 1.0E+08; yy2[0] = cos(xx[0]) * 1.0E+06 + 1.0E+08; for (Int_t ii = 1; ii < nentries; ii++) { xx[ii] = xx[ii - 1] + 0.001; yy1[ii] = sin(xx[ii]) * 1.0E+06 + 1.0E+08; yy2[ii] = cos(xx[ii]) * 1.0E+06 + 1.0E+08; } Float_t xmin[4] = {0.02, 0.52, 0.02, 0.52}; Float_t xmax[4] = {0.48, 0.98, 0.48, 0.98}; Float_t ymin[4] = {0.52, 0.52, 0.02, 0.02}; Float_t ymax[4] = {0.98, 0.98, 0.48, 0.48}; TPad *pad[4]; TPostScript ps("test_ps_2a.ps", type); ps.Range(26, 18); Int_t nplots = 4; char ctitle[10], gtitle[80], htitle[80] = "My plot"; c1 = new TCanvas("c1", htitle, 800, 600); for (ii = 0; ii < nplots; ii++) { Int_t ll = fmod(ii, 4); printf(" ll = %3d\n", ll); if (ll == 0) { ps -> NewPage(); c1 = new TCanvas("c1", htitle, 800, 600); printf(" ll = %d\n", ll); for (Int_t jj = 0; jj < 4; jj++) { pad[jj] = new TPad("pad", "This is pad", xmin[jj], ymin[jj], xmax[jj], ymax[jj], 0); pad[jj] -> Draw(); } } pad[ll] -> cd(); if (fmod(ii, 2) == 0) { gr = new TGraph(nentries, xx, yy1); gr ->SetFillColor(0); gr ->SetLineColor(7); gr ->SetLineWidth(2); sprintf(gtitle, "Sine function Pad %d", ii); gr ->SetTitle(gtitle); } else { gr = new TGraph(nentries, xx, yy2); gr ->SetFillColor(0); gr ->SetLineColor(12); gr ->SetLineWidth(3); sprintf(gtitle, "Cosine function Pad %d", ii); gr ->SetTitle(gtitle); } gr->Draw("AL"); if (ll == 3 || ii == nplots - 1) { c1.Update(); } } ps.Close(); gBenchmark->Show("test_ps_2a"); }
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:37 MET