Fork me on GitHub

Changeset a9d423d in git for examples


Ignore:
Timestamp:
Jul 9, 2013, 10:09:55 PM (11 years ago)
Author:
pavel <pavel@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
78844a1
Parents:
405a724
Message:

increase font size for performance plots

Location:
examples
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • examples/MemoryUsage.C

    r405a724 ra9d423d  
    1212
    1313TGraph grvsz, grrss;
     14TLegend legend(0.41, 0.58, 0.77, 0.67);
     15
     16TCanvas *canvas;
    1417
    1518//------------------------------------------------------------------------------
     
    7275    canvas = new TCanvas("c1", "c1", 800, 650);
    7376  }
    74   canvas->SetLogy(0);
     77  canvas->SetGrid();
    7578  canvas->SetHighLightColor(kExRootBackgroundColor);
    7679
     
    102105  grvsz.Draw("AL");
    103106  grrss.Draw("L");
     107
     108  legend.SetTextSize(kExRootFontSize);
     109  legend.SetTextFont(kExRootFont);
     110  legend.SetFillColor(kExRootBackgroundColor);
     111  legend.SetBorderSize(0);
     112  legend.AddEntry(&grvsz, "virtual memory size", "l");
     113  legend.AddEntry(&grrss, "resident set size", "l");
     114  legend.Draw();
    104115}
    105116
  • examples/ProcessingTime.C

    r405a724 ra9d423d  
    33*/
    44
     5static const Font_t kExRootFont = 42;
     6static const Float_t kExRootFontSize = 0.04;
     7static const Color_t kExRootBackgroundColor = 10;
     8
    59//------------------------------------------------------------------------------
    610
    711TGraphErrors gr;
     12
     13TCanvas *canvas;
    814
    915//------------------------------------------------------------------------------
     
    1723  Int_t i;
    1824
     25  TDirectory *currentDirectory = gDirectory;
     26
     27  // Graphics style parameters to avoid grey background on figures
     28  gStyle->SetCanvasColor(kExRootBackgroundColor);
     29  gStyle->SetStatColor(kExRootBackgroundColor);
     30  //  gStyle->SetTitleColor(kExRootBackgroundColor);
     31  gStyle->SetPadColor(kExRootBackgroundColor);
     32
     33  gStyle->SetPadTopMargin(0.10);
     34  gStyle->SetPadRightMargin(0.10);
     35  gStyle->SetPadBottomMargin(0.15);
     36  gStyle->SetPadLeftMargin(0.15);
     37
     38  gStyle->SetStatFont(kExRootFont);
     39  gStyle->SetStatFontSize(kExRootFontSize);
     40
     41  gStyle->SetTitleFont(kExRootFont, "");
     42  gStyle->SetTitleFont(kExRootFont, "X");
     43  gStyle->SetTitleFont(kExRootFont, "Y");
     44  gStyle->SetTitleFont(kExRootFont, "Z");
     45  gStyle->SetTitleSize(kExRootFontSize, "");
     46  gStyle->SetTitleSize(kExRootFontSize, "X");
     47  gStyle->SetTitleSize(kExRootFontSize, "Y");
     48  gStyle->SetTitleSize(kExRootFontSize, "Z");
     49
     50  gStyle->SetLabelFont(kExRootFont, "X");
     51  gStyle->SetLabelFont(kExRootFont, "Y");
     52  gStyle->SetLabelFont(kExRootFont, "Z");
     53  gStyle->SetLabelSize(kExRootFontSize, "X");
     54  gStyle->SetLabelSize(kExRootFontSize, "Y");
     55  gStyle->SetLabelSize(kExRootFontSize, "Z");
     56
     57  gStyle->SetPadTickX(1);
     58  gStyle->SetPadTickY(1);
     59
     60  gStyle->SetTextFont(kExRootFont);
     61  gStyle->SetTextSize(kExRootFontSize);
     62
     63  gStyle->SetOptStat(111110);
     64  // gStyle->SetOptFit(101);
     65
     66  canvas = static_cast<TCanvas*>(gROOT->FindObject("c1"));
     67  if(canvas)
     68  {
     69    canvas->Clear();
     70    canvas->UseCurrentStyle();
     71    canvas->SetWindowSize(800, 650);
     72  }
     73  else
     74  {
     75    canvas = new TCanvas("c1", "c1", 800, 650);
     76  }
     77  canvas->SetGrid();
     78  canvas->SetHighLightColor(kExRootBackgroundColor);
     79
     80  currentDirectory->cd();
     81
    1982  for(i = 1; i < 8; ++i)
    2083  {
     
    2588
    2689  gr.GetXaxis()->SetLimits(1.0, 9.0);
     90  gr.GetXaxis()->SetTitleOffset(1.5);
     91  gr.GetYaxis()->SetTitleOffset(1.75);
    2792  gr.GetXaxis()->SetTitle("number of jets");
    2893  gr.GetYaxis()->SetTitle("processing time per event, ms");
Note: See TracChangeset for help on using the changeset viewer.