当前位置: 首页>>代码示例>>C++>>正文


C++ TStyle::SetFrameFillColor方法代码示例

本文整理汇总了C++中TStyle::SetFrameFillColor方法的典型用法代码示例。如果您正苦于以下问题:C++ TStyle::SetFrameFillColor方法的具体用法?C++ TStyle::SetFrameFillColor怎么用?C++ TStyle::SetFrameFillColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TStyle的用法示例。


在下文中一共展示了TStyle::SetFrameFillColor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CMSStyle

void CMSStyle() {

  std::cout << "\nApplying CMS style settings...\n" << std::endl ;
  
  TStyle *cmsStyle = new TStyle("CMS","Cms style");

  // ALBERTO: default palette is hideous, use xx.x format for text in TH2   
  cmsStyle->SetPalette(1);
  cmsStyle->SetPaintTextFormat(".1f");

  // use plain black on white colors
  Int_t icol=0; // WHITE
  cmsStyle->SetFrameBorderMode(icol);
  cmsStyle->SetFrameFillColor(icol);
  cmsStyle->SetCanvasBorderMode(icol);
  cmsStyle->SetCanvasColor(icol);
  cmsStyle->SetPadBorderMode(icol);
  cmsStyle->SetPadColor(icol);
  cmsStyle->SetStatColor(icol);
  //cmsStyle->SetFillColor(icol); // don't use: white fill color floa *all* objects

  // set the paper & margin sizes
  cmsStyle->SetPaperSize(20,26);
  cmsStyle->SetPadTopMargin(0.05);
  cmsStyle->SetPadRightMargin(0.05);
  cmsStyle->SetPadBottomMargin(0.16);
  cmsStyle->SetPadLeftMargin(0.16);

  // use large fonts
  //Int_t font=72; // Helvetica italics
  Int_t font=42; // Helvetica
  Double_t tsize=0.05;
  cmsStyle->SetTextFont(font);

  cmsStyle->SetTextSize(tsize);
  cmsStyle->SetLabelFont(font,"x");
  cmsStyle->SetTitleFont(font,"x");
  cmsStyle->SetLabelFont(font,"y");
  cmsStyle->SetTitleFont(font,"y");
  cmsStyle->SetLabelFont(font,"z");
  cmsStyle->SetTitleFont(font,"z");
  
  cmsStyle->SetLabelSize(tsize,"x");
  cmsStyle->SetTitleSize(tsize,"x");
  cmsStyle->SetLabelSize(tsize,"y");
  cmsStyle->SetTitleSize(tsize,"y");
  cmsStyle->SetLabelSize(tsize,"z");
  cmsStyle->SetTitleSize(tsize,"z");

  // use bold lines and markers
  cmsStyle->SetMarkerStyle(20);
  cmsStyle->SetMarkerSize(1.2);
  cmsStyle->SetHistLineWidth(2.);
  cmsStyle->SetLineStyleString(2,"[12 12]"); // postscript dashes

  // get rid of X error bars and y error bar caps
  //cmsStyle->SetErrorX(0.001);

  // do not display any of the standard histogram decorations
  cmsStyle->SetOptTitle(0);
  //cmsStyle->SetOptStat(1111);
  cmsStyle->SetOptStat(0);
  //cmsStyle->SetOptFit(1111);
  cmsStyle->SetOptFit(0);

  // put tick marks on top and RHS of plots
  cmsStyle->SetPadTickX(1);
  cmsStyle->SetPadTickY(1);

  // reset plain style
  //gROOT->SetStyle("Plain");

  gROOT->SetStyle("CMS");
  gROOT->ForceStyle();

}
开发者ID:cmstas,项目名称:SingleLepton2012,代码行数:76,代码来源:CMSStyle.C

示例2: TStyle

void
SetOKStyle()
{
  TStyle* OKStyle = new TStyle("OKStyle", "OK Default Style");

  // Colors

  //set the background color to white
  OKStyle->SetFillColor(10);
  OKStyle->SetFrameFillColor(kWhite);
  OKStyle->SetFrameFillStyle(0);
  OKStyle->SetFillStyle(0);
  OKStyle->SetCanvasColor(kWhite);
  OKStyle->SetPadColor(kWhite);
  OKStyle->SetTitleFillColor(0);
  OKStyle->SetStatColor(kWhite);

  // Get rid of drop shadow on legends
  // This doesn't seem to work.  Call SetBorderSize(1) directly on your TLegends
  OKStyle->SetLegendBorderSize(1);

  //don't put a colored frame around the plots
  OKStyle->SetFrameBorderMode(0);
  OKStyle->SetCanvasBorderMode(0);
  OKStyle->SetPadBorderMode(0);

  //use the primary color palette
  OKStyle->SetPalette(1, 0);

  //set the default line color for a histogram to be black
  OKStyle->SetHistLineColor(kBlack);

  //set the default line color for a fit function to be red
  OKStyle->SetFuncColor(kBlue);

  //make the axis labels black
  OKStyle->SetLabelColor(kBlack, "xyz");

  //set the default title color to be black
  OKStyle->SetTitleColor(kBlack);

  //set the margins
  OKStyle->SetPadBottomMargin(0.15);
  OKStyle->SetPadLeftMargin(0.1);
  OKStyle->SetPadTopMargin(0.075);
  OKStyle->SetPadRightMargin(0.1);

  //set axis label and title text sizes
  OKStyle->SetLabelSize(0.035, "xyz");
  OKStyle->SetTitleSize(0.05, "xyz");
  OKStyle->SetTitleOffset(0.9, "xyz");
  OKStyle->SetStatFontSize(0.035);
  OKStyle->SetTextSize(0.05);
  OKStyle->SetTitleBorderSize(0);
  OKStyle->SetTitleStyle(0);

  OKStyle->SetLegendBorderSize(0);

  //set line widths
  OKStyle->SetHistLineWidth(1);
  OKStyle->SetFrameLineWidth(2);
  OKStyle->SetFuncWidth(2);

  // Misc

  //align the titles to be centered
  //OKStyle->SetTextAlign(22);

  //turn off xy grids
  OKStyle->SetPadGridX(1);
  OKStyle->SetPadGridY(1);

  //set the tick mark style
  OKStyle->SetPadTickX(1);
  OKStyle->SetPadTickY(1);

  //don't show the fit parameters in a box
  OKStyle->SetOptFit(0);

  //set the default stats shown
  OKStyle->SetOptStat(1);

  //marker settings
// 	OKStyle->SetMarkerStyle(8);
// 	OKStyle->SetMarkerSize(0.7);

  // Fonts
  OKStyle->SetStatFont(42);
  OKStyle->SetLabelFont(42, "xyz");
  OKStyle->SetTitleFont(42, "xyz");
  OKStyle->SetTextFont(42);

  // Set the paper size for output
  OKStyle->SetPaperSize(TStyle::kUSLetter);

  //done
  OKStyle->cd();

  cout << "Using Jin's Style" << endl;
}
开发者ID:Chongk,项目名称:coresoftware,代码行数:100,代码来源:SetOKStyle.C

示例3: Style

TStyle* Style() 
{
  TStyle *style = new TStyle("STYLE","User style");

  // use plain black on white colors
  Int_t icol=0; // WHITE
  style->SetFrameBorderMode(icol);
  style->SetFrameFillColor(icol);
  style->SetCanvasBorderMode(icol);
  style->SetCanvasColor(icol);
  style->SetPadBorderMode(icol);
  style->SetPadColor(icol);
  style->SetStatColor(icol);
  //style->SetFillColor(icol); // don't use: white fill color for *all* objects

  // set the paper & margin sizes
  style->SetPaperSize(20,26);

  // set margin sizes
  style->SetPadTopMargin(0.05);
  style->SetPadRightMargin(0.05);
  style->SetPadBottomMargin(0.16);
  style->SetPadLeftMargin(0.16);

  // set title offsets (for axis label)
  style->SetTitleXOffset(1.4);
  style->SetTitleYOffset(1.4);

  // use large fonts
  //Int_t font=72; // Helvetica italics
  Int_t font=42; // Helvetica
  Double_t tsize=0.05;
  style->SetTextFont(font);

  style->SetTextSize(tsize);
  style->SetLabelFont(font,"x");
  style->SetTitleFont(font,"x");
  style->SetLabelFont(font,"y");
  style->SetTitleFont(font,"y");
  style->SetLabelFont(font,"z");
  style->SetTitleFont(font,"z");
  
  style->SetLabelSize(tsize,"x");
  style->SetTitleSize(tsize,"x");
  style->SetLabelSize(tsize,"y");
  style->SetTitleSize(tsize,"y");
  style->SetLabelSize(tsize,"z");
  style->SetTitleSize(tsize,"z");

  // use bold lines and markers
  style->SetMarkerStyle(20);
  style->SetMarkerSize(1.2);
  style->SetHistLineWidth(2.);
  style->SetLineStyleString(2,"[12 12]"); // postscript dashes

  // get rid of X error bars 
  //style->SetErrorX(0.001);
  // get rid of error bar caps
  style->SetEndErrorSize(0.);

  // do not display any of the standard histogram decorations
  style->SetOptTitle(0);
  //style->SetOptStat(1111);
  style->SetOptStat(0);
  //style->SetOptFit(1111);
  style->SetOptFit(0);

  // put tick marks on top and RHS of plots
  style->SetPadTickX(1);
  style->SetPadTickY(1);

  return style;
}
开发者ID:kskovpen,项目名称:bTag,代码行数:73,代码来源:fake.C

示例4: SetStyle

void SetStyle()
{
  TStyle *MITStyle = new TStyle("MIT-Style","The Perfect Style for Plots ;-)");
  gStyle = MITStyle;

  // Canvas
  MITStyle->SetCanvasColor     (0);
  MITStyle->SetCanvasBorderSize(10);
  MITStyle->SetCanvasBorderMode(0);
  MITStyle->SetCanvasDefH      (700);
  MITStyle->SetCanvasDefW      (700);
  MITStyle->SetCanvasDefX      (100);
  MITStyle->SetCanvasDefY      (100);

  // Pads
  MITStyle->SetPadColor       (0);
  MITStyle->SetPadBorderSize  (10);
  MITStyle->SetPadBorderMode  (0);
  MITStyle->SetPadBottomMargin(0.13);
  MITStyle->SetPadTopMargin   (0.08);
  MITStyle->SetPadLeftMargin  (0.15);
  MITStyle->SetPadRightMargin (0.05);
  MITStyle->SetPadGridX       (0);
  MITStyle->SetPadGridY       (0);
  MITStyle->SetPadTickX       (0);
  MITStyle->SetPadTickY       (0);

  // Frames
  MITStyle->SetFrameFillStyle ( 0);
  MITStyle->SetFrameFillColor ( 0);
  MITStyle->SetFrameLineColor ( 1);
  MITStyle->SetFrameLineStyle ( 0);
  MITStyle->SetFrameLineWidth ( 1);
  MITStyle->SetFrameBorderSize(10);
  MITStyle->SetFrameBorderMode( 0);

  // Histograms
  MITStyle->SetHistFillColor(2);
  MITStyle->SetHistFillStyle(0);
  MITStyle->SetHistLineColor(1);
  MITStyle->SetHistLineStyle(0);
  MITStyle->SetHistLineWidth(2);
  MITStyle->SetNdivisions(505);

  // Functions
  MITStyle->SetFuncColor(1);
  MITStyle->SetFuncStyle(0);
  MITStyle->SetFuncWidth(2);

  // Various
  MITStyle->SetMarkerStyle(20);
  MITStyle->SetMarkerColor(kBlack);
  MITStyle->SetMarkerSize (1.2);

  MITStyle->SetTitleSize  (0.055,"X");
  MITStyle->SetTitleOffset(1.200,"X");
  MITStyle->SetLabelOffset(0.005,"X");
  MITStyle->SetLabelSize  (0.050,"X");
  MITStyle->SetLabelFont  (42   ,"X");

  MITStyle->SetStripDecimals(kFALSE);

  MITStyle->SetTitleSize  (0.055,"Y");
  MITStyle->SetTitleOffset(1.800,"Y");
  MITStyle->SetLabelOffset(0.010,"Y");
  MITStyle->SetLabelSize  (0.050,"Y");
  MITStyle->SetLabelFont  (42   ,"Y");

  MITStyle->SetTextSize   (0.055);
  MITStyle->SetTextFont   (42);

  MITStyle->SetStatFont   (42);
  MITStyle->SetTitleFont  (42);
  MITStyle->SetTitleFont  (42,"X");
  MITStyle->SetTitleFont  (42,"Y");

  MITStyle->SetOptStat    (0);
  return;
}
开发者ID:IlariaVai,项目名称:UserCode-1,代码行数:79,代码来源:MitStyle.C

示例5: FakeRate

void FakeRate() {


  TStyle *tdrStyle = new TStyle("tdrStyle","Style for P-TDR");

  // For the canvas:
  tdrStyle->SetCanvasBorderMode(0);
  tdrStyle->SetCanvasColor(kWhite);
  tdrStyle->SetCanvasDefH(600); //Height of canvas
  tdrStyle->SetCanvasDefW(600); //Width of canvas
  tdrStyle->SetCanvasDefX(0);   //POsition on screen
  tdrStyle->SetCanvasDefY(0);

  // For the Pad:
  tdrStyle->SetPadBorderMode(0);
  tdrStyle->SetPadColor(kWhite);
  tdrStyle->SetPadGridX(true);
  tdrStyle->SetPadGridY(true);
  tdrStyle->SetGridColor(0);
  tdrStyle->SetGridStyle(3);
  tdrStyle->SetGridWidth(1);

  // For the frame:
  tdrStyle->SetFrameBorderMode(0);
  tdrStyle->SetFrameBorderSize(1);
  tdrStyle->SetFrameFillColor(0);
  tdrStyle->SetFrameFillStyle(0);
  tdrStyle->SetFrameLineColor(1);
  tdrStyle->SetFrameLineStyle(1);
  tdrStyle->SetFrameLineWidth(1);

  // For the histo:
  tdrStyle->SetHistLineColor(1);
  tdrStyle->SetHistLineStyle(0);
  tdrStyle->SetHistLineWidth(1);
  tdrStyle->SetEndErrorSize(2);
  tdrStyle->SetErrorX(0.);
  tdrStyle->SetMarkerStyle(20);

  //For the fit/function:
  tdrStyle->SetOptFit(1);
  tdrStyle->SetFitFormat("5.4g");
  tdrStyle->SetFuncColor(2);
  tdrStyle->SetFuncStyle(1);
  tdrStyle->SetFuncWidth(1);

  //For the date:
  tdrStyle->SetOptDate(0);

  // For the statistics box:
  tdrStyle->SetOptFile(0);
  tdrStyle->SetOptStat("emr"); // To display the mean and RMS:   SetOptStat("mr");
  tdrStyle->SetStatColor(kWhite);
  tdrStyle->SetStatFont(42);
  tdrStyle->SetStatFontSize(0.025);
  tdrStyle->SetStatTextColor(1);
  tdrStyle->SetStatFormat("6.4g");
  tdrStyle->SetStatBorderSize(1);
  tdrStyle->SetStatH(0.1);
  tdrStyle->SetStatW(0.15);

  // Margins:
  tdrStyle->SetPadTopMargin(0.07);
  tdrStyle->SetPadBottomMargin(0.13);
  tdrStyle->SetPadLeftMargin(0.13);
  tdrStyle->SetPadRightMargin(0.05);

  // For the Global title:
  tdrStyle->SetTitleFont(35);
  tdrStyle->SetTitleColor(1);
  tdrStyle->SetTitleTextColor(1);
  tdrStyle->SetTitleFillColor(10);
  tdrStyle->SetTitleFontSize(0.045);
  tdrStyle->SetTitleX(0.15); // Set the position of the title box
  tdrStyle->SetTitleBorderSize(0);

  // For the axis titles:
  tdrStyle->SetTitleColor(1, "XYZ");
  tdrStyle->SetTitleFont(42, "XYZ");
  tdrStyle->SetTitleSize(0.04, "XYZ");
  tdrStyle->SetTitleXOffset(0.9);
  tdrStyle->SetTitleYOffset(1.5);

  // For the axis labels:
  tdrStyle->SetLabelColor(1, "XYZ");
  tdrStyle->SetLabelFont(42, "XYZ");
  tdrStyle->SetLabelOffset(0.007, "XYZ");
  tdrStyle->SetLabelSize(0.03, "XYZ");

  // For the axis:
  tdrStyle->SetAxisColor(1, "XYZ");
  tdrStyle->SetStripDecimals(kTRUE);
  tdrStyle->SetTickLength(0.03, "XYZ");
  tdrStyle->SetNdivisions(510, "XYZ");
  tdrStyle->SetPadTickX(1);  // To get tick marks on the opposite side of the frame
  tdrStyle->SetPadTickY(1);

  // Change for log plots:
  tdrStyle->SetOptLogx(0);
  tdrStyle->SetOptLogy(0);
//.........这里部分代码省略.........
开发者ID:zdemirag,项目名称:exo-higgs,代码行数:101,代码来源:FakeRate.C

示例6: setTDRStyle

void setTDRStyle() {
  TStyle *tdrStyle = new TStyle("tdrStyle","Style for P-TDR");

// For the canvas:
  tdrStyle->SetCanvasBorderMode(0);
  tdrStyle->SetCanvasColor(kWhite);
  tdrStyle->SetCanvasDefH(600); //Height of canvas
  tdrStyle->SetCanvasDefW(600); //Width of canvas
  tdrStyle->SetCanvasDefX(0);   //POsition on screen
  tdrStyle->SetCanvasDefY(0);

// For the Pad:
  tdrStyle->SetPadBorderMode(0);
  tdrStyle->SetPadColor(kWhite);
  tdrStyle->SetPadGridX(true);
  tdrStyle->SetPadGridY(true);
  tdrStyle->SetGridColor(0);
  tdrStyle->SetGridStyle(3);
  tdrStyle->SetGridWidth(1);

// For the frame:
  tdrStyle->SetFrameBorderMode(0);
  tdrStyle->SetFrameBorderSize(1);
  tdrStyle->SetFrameFillColor(0);
  tdrStyle->SetFrameFillStyle(0);
  tdrStyle->SetFrameLineColor(1);
  tdrStyle->SetFrameLineStyle(1);
  tdrStyle->SetFrameLineWidth(1);

// For the histo:
  tdrStyle->SetHistLineColor(1);
  tdrStyle->SetHistLineStyle(0);
  tdrStyle->SetHistLineWidth(1);

  tdrStyle->SetEndErrorSize(2);
  tdrStyle->SetErrorX(0.);
  
  tdrStyle->SetMarkerStyle(20);

//For the fit/function:
  tdrStyle->SetOptFit(1);
  tdrStyle->SetFitFormat("5.4g");
  tdrStyle->SetFuncColor(2);
  tdrStyle->SetFuncStyle(1);
  tdrStyle->SetFuncWidth(1);

//For the date:
  tdrStyle->SetOptDate(0);

// For the statistics box:
  tdrStyle->SetOptFile(0);
  tdrStyle->SetOptStat(0); // To display the mean and RMS:   SetOptStat("mr");
  tdrStyle->SetStatColor(kWhite);
  tdrStyle->SetStatFont(42);
  tdrStyle->SetStatFontSize(0.025);
  tdrStyle->SetStatTextColor(1);
  tdrStyle->SetStatFormat("6.4g");
  tdrStyle->SetStatBorderSize(1);
  tdrStyle->SetStatH(0.1);
  tdrStyle->SetStatW(0.15);

// Margins:
  tdrStyle->SetPadTopMargin(0.05);
  tdrStyle->SetPadBottomMargin(0.13);
  tdrStyle->SetPadLeftMargin(0.16);
  tdrStyle->SetPadRightMargin(0.05);

// For the Global title:

  tdrStyle->SetOptTitle(0);
  tdrStyle->SetTitleFont(42);
  tdrStyle->SetTitleColor(1);
  tdrStyle->SetTitleTextColor(1);
  tdrStyle->SetTitleFillColor(10);
  tdrStyle->SetTitleFontSize(0.05);

// For the axis titles:

  tdrStyle->SetTitleColor(1, "XYZ");
  tdrStyle->SetTitleFont(42, "XYZ");
  tdrStyle->SetTitleSize(0.06, "XYZ");
  tdrStyle->SetTitleXOffset(0.9);
  tdrStyle->SetTitleYOffset(1.25);

// For the axis labels:

  tdrStyle->SetLabelColor(1, "XYZ");
  tdrStyle->SetLabelFont(42, "XYZ");
  tdrStyle->SetLabelOffset(0.007, "XYZ");
  tdrStyle->SetLabelSize(0.05, "XYZ");

// For the axis:

  tdrStyle->SetAxisColor(1, "XYZ");
  tdrStyle->SetStripDecimals(kTRUE);
  tdrStyle->SetTickLength(0.03, "XYZ");
  tdrStyle->SetNdivisions(510, "XYZ");
  tdrStyle->SetPadTickX(1);  // To get tick marks on the opposite side of the frame
  tdrStyle->SetPadTickY(1);

//.........这里部分代码省略.........
开发者ID:iihe-cms-sw,项目名称:TreeAnalysis,代码行数:101,代码来源:tdrstyle.C

示例7: setStyle

void setStyle(){

//Style//

  TStyle *tdrStyle = new TStyle("tdrStyle","Style for P-TDR");

// For the canvas:
  tdrStyle->SetCanvasBorderMode(0);
  tdrStyle->SetCanvasColor(kWhite);
  tdrStyle->SetCanvasDefH(600); //Height of canvas
  tdrStyle->SetCanvasDefW(600); //Width of canvas
  tdrStyle->SetCanvasDefX(0);   //POsition on screen
  tdrStyle->SetCanvasDefY(0);

// For the Pad:
  tdrStyle->SetPadBorderMode(0);
  tdrStyle->SetPadColor(kWhite);
  tdrStyle->SetPadGridX(false);
  tdrStyle->SetPadGridY(false);
  tdrStyle->SetGridColor(0);
  tdrStyle->SetGridStyle(3);
  tdrStyle->SetGridWidth(1);

// For the frame:
  tdrStyle->SetFrameBorderMode(0);
  tdrStyle->SetFrameBorderSize(1);
  tdrStyle->SetFrameFillColor(0);
  tdrStyle->SetFrameFillStyle(0);
  tdrStyle->SetFrameLineColor(1);
  tdrStyle->SetFrameLineStyle(1);
  tdrStyle->SetFrameLineWidth(1);

  tdrStyle->SetPadTopMargin(0.05);
  tdrStyle->SetPadBottomMargin(0.13);
  tdrStyle->SetPadLeftMargin(0.16);
  tdrStyle->SetPadRightMargin(0.02);

// For the Global title:

  tdrStyle->SetOptTitle(0);
  tdrStyle->SetTitleFont(42);
  tdrStyle->SetTitleColor(1);
  tdrStyle->SetTitleTextColor(1);
  tdrStyle->SetTitleFillColor(10);
  tdrStyle->SetTitleFontSize(0.05);

// For the axis titles:

  tdrStyle->SetTitleColor(1, "XYZ");
  tdrStyle->SetTitleFont(42, "XYZ");
  tdrStyle->SetTitleSize(0.06, "XYZ");
  tdrStyle->SetTitleXOffset(0.9);
  tdrStyle->SetTitleYOffset(0.9);

// For the axis labels:

  tdrStyle->SetLabelColor(1, "XYZ");
  tdrStyle->SetLabelFont(42, "XYZ");
  tdrStyle->SetLabelOffset(0.007, "XYZ");
  tdrStyle->SetLabelSize(0.05, "XYZ");

// For the axis:

  tdrStyle->SetAxisColor(1, "XYZ");
  //tdrStyle->SetStripDecimals(kTRUE);
  tdrStyle->SetTickLength(0.03, "XYZ");
  tdrStyle->SetNdivisions(510, "XYZ");
  tdrStyle->SetPadTickX(1);  // To get tick marks on the opposite side of the frame
  tdrStyle->SetPadTickY(1);

  tdrStyle->SetPaperSize(20.,20.);

  tdrStyle->SetHatchesLineWidth(5);
  tdrStyle->SetHatchesSpacing(0.05);

  tdrStyle->SetOptStat(0);

  tdrStyle->cd();
}
开发者ID:cihar29,项目名称:OffsetAnalysis,代码行数:79,代码来源:scalefactor.c

示例8: SetStyle_PRD

//set global style to PRD recommendation????
void SetStyle_PRD(){

  TStyle *RootStyle = new TStyle("Root-Style","Single Top Style for PRD");
  
#ifdef __CINT__
  TStyle *GloStyle;
  GloStyle = gStyle;                          // save the global style reference
  gStyle = RootStyle;
#endif


  // Canvas

  RootStyle->SetCanvasColor     (0);
  RootStyle->SetCanvasBorderMode(0);

  // Pads

  RootStyle->SetPadColor       (0);
  RootStyle->SetPadBorderMode  (0);
  RootStyle->SetPadBottomMargin(0.17);
  RootStyle->SetPadTopMargin   (0.07);
  RootStyle->SetPadLeftMargin  (0.18);
  RootStyle->SetPadRightMargin (0.08);
  RootStyle->SetPadTickX       (0);
  RootStyle->SetPadTickY       (0);

  // Frames

  RootStyle->SetFrameLineWidth (3);
  RootStyle->SetFrameFillColor (0);
  RootStyle->SetFrameBorderMode(0);
  RootStyle->SetFrameBorderSize(0);


  // Histograms

   RootStyle->SetHistFillColor(0);
   RootStyle->SetHistLineWidth(2);

  // Functions

  //RootStyle->SetFuncColor(1);
  //RootStyle->SetFuncStyle(0);
  //RootStyle->SetFuncWidth(2);

  //Legends 

  //RootStyle->SetLegendBorderSize(0);
  //RootStyle->SetFillStyle(0);
  //RootStyle->SetTextFont(62); 
  //RootStyle->SetTextSize(0.045);

  // Labels, Ticks, and Titles

  //RootStyle->SetTickLength ( 0.015,"X");
  RootStyle->SetTitleSize  ( 0.070,"X");
  RootStyle->SetTitleOffset( 1.100,"X");
  RootStyle->SetLabelSize  ( 0.070,"X");
  RootStyle->SetNdivisions ( 505  ,"X");

//RootStyle->SetTickLength ( 0.015,"Y");
  RootStyle->SetTitleSize  ( 0.070,"Y");
  RootStyle->SetTitleOffset( 1.300,"Y");
  RootStyle->SetLabelSize  ( 0.070,"Y");
  RootStyle->SetNdivisions ( 505  ,"Y");

//   RootStyle->SetTickLength ( 0.015,"Z");
//   RootStyle->SetTitleSize  ( 0.060,"Z");
//   RootStyle->SetTitleOffset( 1.100,"Z");
//   RootStyle->SetLabelOffset( 0.015,"Z");
//   RootStyle->SetLabelSize  ( 0.050,"Z");
//   RootStyle->SetLabelFont  ( 42   ,"Z");
//   RootStyle->SetTitleFont  ( 42   ,"Z");
//   RootStyle->SetNdivisions ( 707   ,"Z");


  RootStyle->SetTitleBorderSize  (0);
  RootStyle->SetTitleFillColor  (0);  
//RootStyle->SetTitleFont  (42);
//RootStyle->SetTitleColor  (1);

  RootStyle->SetLineWidth  (2);

  // Options

  RootStyle->SetOptFit        (0111);
  RootStyle->SetOptStat       (1);
  RootStyle->SetStatBorderSize(0);
  RootStyle->SetStatColor     (0);
  RootStyle->SetStatW(0.5);
//  RootStyle->SetMarkerStyle(20);
//RootStyle->SetMarkerSize(1.25);

//RootStyle->SetPalette(1);

}
开发者ID:MT2Analysis,项目名称:MT2Analysis,代码行数:98,代码来源:SetStyle_PRD.C

示例9: teenyWeenyBtagEffCalculation

void teenyWeenyBtagEffCalculation(){
  
  // TDR style crap - include from Utilities.cc
  TStyle *tdrStyle = new TStyle("tdrStyle","Style for P-TDR");
  // For the canvas:
  tdrStyle->SetCanvasBorderMode(0);
  tdrStyle->SetCanvasColor(kWhite);
  tdrStyle->SetCanvasDefH(600); //Height of canvas
  tdrStyle->SetCanvasDefW(600); //Width of canvas
  tdrStyle->SetCanvasDefX(0);   //Position on screen
  tdrStyle->SetCanvasDefY(0);
  
  // For the Pad:
  tdrStyle->SetPadBorderMode(0);
  // tdrStyle->SetPadBorderSize(Width_t size = 1);
  tdrStyle->SetPadColor(kWhite);
  tdrStyle->SetPadGridX(false);
  tdrStyle->SetPadGridY(false);
  tdrStyle->SetGridColor(0);
  tdrStyle->SetGridStyle(3);
  tdrStyle->SetGridWidth(1);
  
  // For the frame:
  tdrStyle->SetFrameBorderMode(0);
  tdrStyle->SetFrameBorderSize(1);
  tdrStyle->SetFrameFillColor(0);
  tdrStyle->SetFrameFillStyle(0);
  tdrStyle->SetFrameLineColor(1);
  tdrStyle->SetFrameLineStyle(1);
  tdrStyle->SetFrameLineWidth(1);
  
  // For the histo:
  // tdrStyle->SetHistFillColor(1);
  // tdrStyle->SetHistFillStyle(0);
  tdrStyle->SetHistLineColor(1);
  tdrStyle->SetHistLineStyle(0);
  tdrStyle->SetHistLineWidth(1);
  // tdrStyle->SetLegoInnerR(Float_t rad = 0.5);
  // tdrStyle->SetNumberContours(Int_t number = 20);
  
  tdrStyle->SetEndErrorSize(2);
  //tdrStyle->SetErrorMarker(20);
  tdrStyle->SetErrorX(0.);
  
  tdrStyle->SetMarkerStyle(20);
  
  //For the fit/function:
  tdrStyle->SetOptFit(1);
  tdrStyle->SetFitFormat("5.4g");
  tdrStyle->SetFuncColor(2);
  tdrStyle->SetFuncStyle(1);
  tdrStyle->SetFuncWidth(1);
  
  //For the date:
  tdrStyle->SetOptDate(0);
  // tdrStyle->SetDateX(Float_t x = 0.01);
  // tdrStyle->SetDateY(Float_t y = 0.01);
  
  // For the statistics box:
  tdrStyle->SetOptFile(0);
  tdrStyle->SetOptStat(0); // To display the mean and RMS:   SetOptStat("mr");
  tdrStyle->SetStatColor(kWhite);
  tdrStyle->SetStatFont(42);
  tdrStyle->SetStatFontSize(0.025);
  tdrStyle->SetStatTextColor(1);
  tdrStyle->SetStatFormat("6.4g");
  tdrStyle->SetStatBorderSize(1);
  tdrStyle->SetStatH(0.1);
  tdrStyle->SetStatW(0.15);
  // tdrStyle->SetStatStyle(Style_t style = 1001);
  // tdrStyle->SetStatX(Float_t x = 0);
  // tdrStyle->SetStatY(Float_t y = 0);

  // Margins:
  tdrStyle->SetPadTopMargin(0.05);
  tdrStyle->SetPadBottomMargin(0.13);
  tdrStyle->SetPadLeftMargin(0.16);
  tdrStyle->SetPadRightMargin(0.04);
  
  // For the Global title:

  tdrStyle->SetOptTitle(0);
  tdrStyle->SetTitleFont(42);
  tdrStyle->SetTitleColor(1);
  tdrStyle->SetTitleTextColor(1);
  tdrStyle->SetTitleFillColor(10);
  tdrStyle->SetTitleFontSize(0.05);
  // tdrStyle->SetTitleH(0); // Set the height of the title box
  // tdrStyle->SetTitleW(0); // Set the width of the title box
  // tdrStyle->SetTitleX(0); // Set the position of the title box
  // tdrStyle->SetTitleY(0.985); // Set the position of the title box
  // tdrStyle->SetTitleStyle(Style_t style = 1001);
  // tdrStyle->SetTitleBorderSize(2);
  
  // For the axis titles:
  
  tdrStyle->SetTitleColor(1, "XYZ");
  tdrStyle->SetTitleFont(42, "XYZ");
  tdrStyle->SetTitleSize(0.05, "XYZ");
  // tdrStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size?
//.........这里部分代码省略.........
开发者ID:vveckaln,项目名称:spy_analysis,代码行数:101,代码来源:teenyWeenyBtagEffCalculation.C

示例10: drawNmenoUno

void drawNmenoUno() {

  TStyle *simpleStyle = new TStyle("simpleStyle","");
  simpleStyle->SetCanvasColor(0);
  simpleStyle->SetFrameFillColor(0);
  simpleStyle->SetStatColor(0);
  simpleStyle->SetOptStat(0);
  simpleStyle->SetTitleFillColor(0);
  simpleStyle->SetCanvasBorderMode(0);
  simpleStyle->SetPadBorderMode(0);
  simpleStyle->SetFrameBorderMode(0);
  simpleStyle->cd();

  TChain* chain = new TChain("jetTree");

  //chain->Add("2ndLevelOutputFile_PhotonJet15.root");
  //chain->Add("2ndLevelOutputFile_PhotonJet30.root");
  //chain->Add("2ndLevelOutputFile_PhotonJet80.root");
  chain->Add("2ndLevelOutputFile_PhotonJet170.root");
  //chain->Add("2ndLevelOutputFile_PhotonJet300.root");
  //chain->Add("2ndLevelOutputFile_PhotonJet470.root");
  //chain->Add("2ndLevelOutputFile_PhotonJet800.root");

  Float_t eventWeight;
  chain->SetBranchAddress("eventWeight", &eventWeight);

  Float_t hcalIso;
  chain->SetBranchAddress("hcalIsoPhotReco", &hcalIso);

  Float_t ecalIso;
  chain->SetBranchAddress("ecalIsoPhotReco", &ecalIso);

  Int_t nTrkIso;
  chain->SetBranchAddress("nTrkIsoPhotReco", &nTrkIso);

  Float_t ptTrkIso;
  chain->SetBranchAddress("ptTrkIsoPhotReco", &ptTrkIso);

  Float_t clusterMaj;
  chain->SetBranchAddress("clusterMajPhotReco", &clusterMaj);

  Float_t clusterMin;
  chain->SetBranchAddress("clusterMinPhotReco", &clusterMin);

  Float_t ptPhot;
  chain->SetBranchAddress("ptPhotReco", &ptPhot);

  Float_t etaPhot;
  chain->SetBranchAddress("etaPhotReco", &etaPhot);

  Float_t phiPhot;
  chain->SetBranchAddress("phiPhotReco", &phiPhot);

  Float_t pt2ndJet;
  chain->SetBranchAddress("pt2ndJetReco", &pt2ndJet);

  Float_t phi2ndJet;
  chain->SetBranchAddress("phi2ndJetReco", &phi2ndJet);

  Float_t eta2ndJet;
  chain->SetBranchAddress("eta2ndJetReco", &eta2ndJet);

  Float_t phiJet;
  chain->SetBranchAddress("phiJetReco", &phiJet);


  TH1F* h1_hcalIso = new TH1F("hcalIso", "", 100, -0.2, 1.4 );
  TH1F* h1_ecalIso = new TH1F("ecalIso", "", 100, -0.2, 1.4 );
  TH1F* h1_nTrkIso = new TH1F("nTrkIso", "", 26, -0.5, 25.5 );
  TH1F* h1_ptTrkIso = new TH1F("ptTrkIso", "", 100, 0., 5. );
  TH1F* h1_clusterMaj = new TH1F("clusterMaj", "", 100, 0., 2. );
  TH1F* h1_clusterMin = new TH1F("clusterMin", "", 100, 0., 1.4 );
  //TH1F* h1_ptPhot = new TH1F("ptPhot", "", 100, 0., 70. );
  //TH1F* h1_etaPhot = new TH1F("etaPhot", "", 100, -3.5, 3.5 );
  TH1F* h1_pt2ndJet = new TH1F("pt2ndJet", "", 100, 0., 5.);
  TH1F* h1_deltaPhi = new TH1F("deltaPhi", "", 100, 0., 3.14159);

  TH1F* h1_deltaR = new TH1F("deltaR", "", 100, 0., 1.);


  //efficiency plots:
  Int_t nBins_pt = 15;
  Float_t ptMin = 0.;
  Float_t ptMax = 700.;
  TH1F* h1_ptPhot_denom = new TH1F("ptPhot_denom", "", nBins_pt, ptMin, ptMax);
  h1_ptPhot_denom->SetMarkerStyle(20);
  TH1F* h1_ptPhot_nTrkIso_abs = new TH1F("ptPhot_nTrkIso_abs", "", nBins_pt, ptMin, ptMax);
  h1_ptPhot_nTrkIso_abs->SetMarkerStyle(20);
  TH1F* h1_ptPhot_nTrkIso_cascade = new TH1F("ptPhot_nTrkIso_cascade", "", nBins_pt, ptMin, ptMax);
  TH1F* h1_ptPhot_ptTrkIso_abs = new TH1F("ptPhot_ptTrkIso_abs", "", nBins_pt, ptMin, ptMax);
  TH1F* h1_ptPhot_ptTrkIso_cascade = new TH1F("ptPhot_ptTrkIso_cascade", "", nBins_pt, ptMin, ptMax);
  TH1F* h1_ptPhot_hcalIso_abs = new TH1F("ptPhot_hcalIso_abs", "", nBins_pt, ptMin, ptMax);
  TH1F* h1_ptPhot_hcalIso_cascade = new TH1F("ptPhot_hcalIso_cascade", "", nBins_pt, ptMin, ptMax);
  TH1F* h1_ptPhot_clusterMaj_abs = new TH1F("ptPhot_clusterMaj_abs", "", nBins_pt, ptMin, ptMax);
  TH1F* h1_ptPhot_clusterMaj_cascade = new TH1F("ptPhot_clusterMaj_cascade", "", nBins_pt, ptMin, ptMax);
  TH1F* h1_ptPhot_clusterMin_abs = new TH1F("ptPhot_clusterMin_abs", "", nBins_pt, ptMin, ptMax);
  TH1F* h1_ptPhot_clusterMin_cascade = new TH1F("ptPhot_clusterMin_cascade", "", nBins_pt, ptMin, ptMax);
  TH1F* h1_ptPhot_ecalIso_abs = new TH1F("ptPhot_ecalIso_abs", "", nBins_pt, ptMin, ptMax);
  TH1F* h1_ptPhot_ecalIso_cascade = new TH1F("ptPhot_ecalIso_cascade", "", nBins_pt, ptMin, ptMax);
  
//.........这里部分代码省略.........
开发者ID:amarini,项目名称:pandolf,代码行数:101,代码来源:drawNmenoUno.C

示例11: FitXS

void FitXS (int nminx = 0, int nmaxx = 1509, int nmintest = 0, int nmaxtest = 1509) {
    ////////////////////////////////////////////////////
    // ftp://root.cern.ch/root/doc/ROOTUsersGuideHTML/ch09s05.html
    TStyle *defaultStyle = new TStyle("defaultStyle","Default Style");
    //gStyle->SetOptStat(0);
    //  defaultStyle->SetOptStat(0000);
    //  defaultStyle->SetOptFit(000); 
    //  defaultStyle->SetPalette(1);
    ////////////////////////
    defaultStyle->SetOptStat(0); // remove info box
    /////// pad ////////////
    defaultStyle->SetPadBorderMode(0);
    defaultStyle->SetPadBorderSize(3);
    defaultStyle->SetPadColor(0);
    defaultStyle->SetPadTopMargin(0.1);
    defaultStyle->SetPadBottomMargin(0.16);
    defaultStyle->SetPadRightMargin(5.5);
    defaultStyle->SetPadLeftMargin(0.18);
    /////// canvas /////////
    defaultStyle->SetCanvasBorderMode(1);
    defaultStyle->SetCanvasColor(0);
    //  defaultStyle->SetCanvasDefH(600);
    //  defaultStyle->SetCanvasDefW(600);
    /////// frame //////////
    //defaultStyle->SetFrameBorderMode(1);
    //defaultStyle->SetFrameBorderSize(1);
    defaultStyle->SetFrameFillColor(0); 
    defaultStyle->SetFrameLineColor(1);
    /////// label //////////
    //  defaultStyle->SetLabelOffset(0.005,"XY");
    //  defaultStyle->SetLabelSize(0.05,"XY");
    //defaultStyle->SetLabelFont(46,"XY");
    /////// title //////////
    //defaultStyle->SetTitleW(0.6);
    defaultStyle->SetTitleSize(0.08, "XYZ");
    defaultStyle->SetTitleBorderSize(0);
    defaultStyle->SetTitleX(0.2);
    //  defaultStyle->SetTitleOffset(1.1,"X");
    //  defaultStyle->SetTitleSize(0.01,"X");
    //  defaultStyle->SetTitleOffset(1.25,"Y");
    //  defaultStyle->SetTitleSize(0.05,"Y");
    //defaultStyle->SetTitleFont(42, "XYZ");
    /////// various ////////
    defaultStyle->SetNdivisions(303,"Y");
    defaultStyle->SetTitleFillColor(0);//SetTitleFillStyle(0, "Z");
    //defaultStyle->SetTitleX(0.2);
    //defaultStyle->SetTitleY(0.1);
    //defaultStyle->SetTitleBorderSize(-0.1);  // For the axis titles:
    
    //    defaultStyle->SetTitleColor(1, "XYZ");
    //    defaultStyle->SetTitleFont(42, "XYZ");
    
    
    // defaultStyle->SetTitleYSize(0.08);
    //defaultStyle->SetTitleXOffset(0.9);
    //defaultStyle->SetTitleYOffset(1.05);
    defaultStyle->SetTitleOffset(1.3, "Y"); // Another way to set the Offset
    //defaultStyle->SetTitleOffset(1.0, "X"); // Another way to set the Offset    
    // For the axis labels:
    defaultStyle->SetLabelColor(1, "XYZ");
    //defaultStyle->SetLabelFont(46, "XYZ");
    defaultStyle->SetLabelOffset(0.03, "XYZ");
    defaultStyle->SetLabelSize(0.07, "XYZ");
    //defaultStyle->SetLabelY(0.06);    
    // For the axis:
    //    defaultStyle->SetAxisColor(1, "XYZ");
    defaultStyle->SetStripDecimals(kTRUE);
    defaultStyle->SetTickLength(0.03, "XYZ");
    defaultStyle->SetNdivisions(7, "XYZ");
    //    defaultStyle->SetPadTickX(1);   // To get tick marks on the opposite side of the frame
    //    defaultStyle->SetPadTickY(1);
    defaultStyle->cd();

    ///////////////////////////////////////////

  nmin=nminx;
  nmax=nmaxx;
  if (nmin<0) nmin=0;
  if (nmax>Npoints) nmax=Npoints;
  // Read in the cross section values and the parameters space points
  ifstream XSvals;
    XSvals.open("list_all_translation_CX.txt");//"14TeV_CX_5k_opositecgw.ascii");// "8TeV_CX_5k_opositecgw.ascii");//
  for (int i=nmin; i<nmax; i++)  {
    XSvals >> par0[i] >> par1[i] >> par2[i] >> par3[i] >> par4[i] >> cross_section[i] >> cross_sectionerr[i];
    cout << "For point i = " << i << "pars are " << par0[i] << " " << par1[i] << " " << par2[i] 
    	 << " " << par3[i] << " " << par4[i] << " and xs is " << cross_section[i] << endl;
  }
  
  cout << "**********************************************" << endl;
  
  // Likelihood maximization
  // -----------------------  
  // Minuit routine
  TMinuit rmin(2);
  rmin.SetFCN(Likelihood);
  // Main initialization member function for MINUIT
  rmin.mninit(5,6,7);
  // Parameters needed to be unambiguous with MINOS
  int iflag=0; // You can use this for selection
  double arglis[4];
//.........这里部分代码省略.........
开发者ID:acarvalh,项目名称:generateHH,代码行数:101,代码来源:FitXS.C

示例12: createMyStyle

TStyle* createMyStyle() {
  TStyle *myStyle = new TStyle("myStyle", "myStyle");

  // For the canvas:
  myStyle->SetCanvasBorderMode(0);
  myStyle->SetCanvasColor(kWhite);
  myStyle->SetCanvasDefH(800); //Height of canvas
  myStyle->SetCanvasDefW(800); //Width of canvas
  myStyle->SetCanvasDefX(0);   //POsition on screen
  myStyle->SetCanvasDefY(0);

  // For the Pad:
  myStyle->SetPadBorderMode(0);
  myStyle->SetPadColor(kWhite);
  myStyle->SetPadGridX(false);
  myStyle->SetPadGridY(false);
  myStyle->SetGridColor(0);
  myStyle->SetGridStyle(3);
  myStyle->SetGridWidth(1);

  // For the frame:
  myStyle->SetFrameBorderMode(0);
  myStyle->SetFrameBorderSize(1);
  myStyle->SetFrameFillColor(0);
  myStyle->SetFrameFillStyle(0);
  myStyle->SetFrameLineColor(1);
  myStyle->SetFrameLineStyle(1);
  myStyle->SetFrameLineWidth(1);

  // For the histo:
  myStyle->SetHistLineStyle(1);
  myStyle->SetHistLineWidth(2);
  myStyle->SetEndErrorSize(2);

  //For the fit/function:
  myStyle->SetFitFormat("5.4g");
  myStyle->SetFuncColor(2);
  myStyle->SetFuncStyle(1);
  myStyle->SetFuncWidth(1);

  // For the statistics box:
  myStyle->SetOptFile(0);
  myStyle->SetStatColor(kWhite);
  //myStyle->SetStatFont(43);
  //myStyle->SetStatFontSize(0.025);
  myStyle->SetStatTextColor(1);
  myStyle->SetStatFormat("6.4g");
  myStyle->SetStatBorderSize(1);
  myStyle->SetStatH(0.12);
  myStyle->SetStatW(0.3);
  myStyle->SetStatY(0.92);
  myStyle->SetStatX(0.94);

  //For the date:
  myStyle->SetOptDate(0);

  // Margins:
  myStyle->SetPadTopMargin(TOP_MARGIN);
  myStyle->SetPadBottomMargin(BOTTOM_MARGIN);
  myStyle->SetPadLeftMargin(LEFT_MARGIN);
  myStyle->SetPadRightMargin(RIGHT_MARGIN);

  // For the Global title:
  myStyle->SetOptTitle(0);
  myStyle->SetTitleFont(63);
  myStyle->SetTitleColor(1);
  myStyle->SetTitleTextColor(1);
  myStyle->SetTitleFillColor(10);
  myStyle->SetTitleBorderSize(0);
  myStyle->SetTitleAlign(33); 
  myStyle->SetTitleX(1);
  myStyle->SetTitleFontSize(TITLE_FONTSIZE);

  // For the axis titles:

  myStyle->SetTitleColor(1, "XYZ");
  myStyle->SetTitleFont(43, "XYZ");
  myStyle->SetTitleSize(TITLE_FONTSIZE, "XYZ");
  myStyle->SetTitleYOffset(2.); 
  myStyle->SetTitleXOffset(1.25);

  myStyle->SetLabelColor(1, "XYZ");
  myStyle->SetLabelFont(43, "XYZ");
  myStyle->SetLabelOffset(0.01, "YZ");
  myStyle->SetLabelOffset(0.015, "X");
  myStyle->SetLabelSize(LABEL_FONTSIZE, "XYZ");

  myStyle->SetAxisColor(1, "XYZ");
  myStyle->SetStripDecimals(kTRUE);
  myStyle->SetTickLength(0.03, "XYZ");
  myStyle->SetNdivisions(510, "XYZ");
  myStyle->SetPadTickX(1);  // To get tick marks on the opposite side of the frame
  myStyle->SetPadTickY(1);

  myStyle->SetOptLogx(0);
  myStyle->SetOptLogy(0);
  myStyle->SetOptLogz(0);

  myStyle->SetHatchesSpacing(1.3);
  myStyle->SetHatchesLineWidth(1);
//.........这里部分代码省略.........
开发者ID:ebouvier,项目名称:UserCode,代码行数:101,代码来源:calib.C

示例13: SetTMVAStyle

   void SetTMVAStyle() {
      
      TStyle *TMVAStyle = gROOT->GetStyle("TMVA");
      if(TMVAStyle!=0) {
         gROOT->SetStyle("TMVA");
         return;
      }
			
      TMVAStyle = new TStyle(*gROOT->GetStyle("Plain")); // our style is based on Plain
      TMVAStyle->SetName("TMVA");
      TMVAStyle->SetTitle("TMVA style based on \"Plain\" with modifications defined in tmvaglob.C");
      gROOT->GetListOfStyles()->Add(TMVAStyle);
      gROOT->SetStyle("TMVA");
			
      TMVAStyle->SetLineStyleString( 5, "[52 12]" );
      TMVAStyle->SetLineStyleString( 6, "[22 12]" );
      TMVAStyle->SetLineStyleString( 7, "[22 10 7 10]" );

      // the pretty color palette of old
      TMVAStyle->SetPalette((UsePaperStyle ? 18 : 1),0);

      // use plain black on white colors
      TMVAStyle->SetFrameBorderMode(0);
      TMVAStyle->SetCanvasBorderMode(0);
      TMVAStyle->SetPadBorderMode(0);
      TMVAStyle->SetPadColor(0);
      TMVAStyle->SetFillStyle(0);

      TMVAStyle->SetLegendBorderSize(0);

      // title properties
      // TMVAStyle->SetTitleW(.4);
      // TMVAStyle->SetTitleH(.10);
      // MVAStyle->SetTitleX(.5);
      // TMVAStyle->SetTitleY(.9);
      TMVAStyle->SetTitleFillColor( c_TitleBox );
      TMVAStyle->SetTitleTextColor( c_TitleText );
      TMVAStyle->SetTitleBorderSize( 1 );
      TMVAStyle->SetLineColor( c_TitleBorder );
      if (!UsePaperStyle) {
         TMVAStyle->SetFrameFillColor( c_FrameFill );
         TMVAStyle->SetCanvasColor( c_Canvas );
      }

      // set the paper & margin sizes
      TMVAStyle->SetPaperSize(20,26);
      TMVAStyle->SetPadTopMargin(0.10);
      TMVAStyle->SetPadRightMargin(0.05);
      TMVAStyle->SetPadBottomMargin(0.11);
      TMVAStyle->SetPadLeftMargin(0.12);

      // use bold lines and markers
      TMVAStyle->SetMarkerStyle(21);
      TMVAStyle->SetMarkerSize(0.3);
      TMVAStyle->SetHistLineWidth(2);
      TMVAStyle->SetLineStyleString(2,"[12 12]"); // postscript dashes

      // do not display any of the standard histogram decorations
      TMVAStyle->SetOptTitle(1);
      TMVAStyle->SetTitleH(0.052);

      TMVAStyle->SetOptStat(0);
      TMVAStyle->SetOptFit(0);

      // put tick marks on top and RHS of plots
      TMVAStyle->SetPadTickX(1);
      TMVAStyle->SetPadTickY(1);

   }
开发者ID:bcarls,项目名称:anatreeloop,代码行数:69,代码来源:tmvaglob.C

示例14: setNCUStyle

void setNCUStyle(bool gridOn=false) {
  TStyle* ncuStyle = new TStyle("ncuStyle","Style for P-NCU");

// For the canvas:
  ncuStyle->SetCanvasBorderMode(0);
  ncuStyle->SetCanvasColor(kWhite);
  ncuStyle->SetCanvasDefH(600); //Height of canvas
  ncuStyle->SetCanvasDefW(600); //Width of canvas
  ncuStyle->SetCanvasDefX(0);   //POsition on screen
  ncuStyle->SetCanvasDefY(0);

// For the Pad:
  ncuStyle->SetPadBorderMode(0);
  // ncuStyle->SetPadBorderSize(Width_t size = 1);
  ncuStyle->SetPadColor(kWhite);
  ncuStyle->SetPadGridX(gridOn);
  ncuStyle->SetPadGridY(gridOn);
  ncuStyle->SetGridColor(0);
  ncuStyle->SetGridStyle(3);
  ncuStyle->SetGridWidth(1);

// For the frame:
  ncuStyle->SetFrameBorderMode(0);
  ncuStyle->SetFrameBorderSize(1);
  ncuStyle->SetFrameFillColor(0);
  ncuStyle->SetFrameFillStyle(0);
  ncuStyle->SetFrameLineColor(1);
  ncuStyle->SetFrameLineStyle(1);
  ncuStyle->SetFrameLineWidth(3);

// For the Legend:
  ncuStyle->SetLegendBorderSize(0);
  ncuStyle->SetLegendFillColor(0);
  ncuStyle->SetLegendFont(42);
  //ncuStyle->SetLegendFont(62);
  
// For the histo:
  // ncuStyle->SetHistFillColor(1);
  // ncuStyle->SetHistFillStyle(0);
  ncuStyle->SetHistLineColor(1);
  ncuStyle->SetHistLineStyle(0);
  ncuStyle->SetHistLineWidth(3);
  // ncuStyle->SetLegoInnerR(Float_t rad = 0.5);
  // ncuStyle->SetNumberContours(Int_t number = 20);

  ncuStyle->SetEndErrorSize(2);
  // ncuStyle->SetErrorMarker(20);
  //ncuStyle->SetErrorX(0.);
  
  ncuStyle->SetMarkerStyle(20);
  
//For the fit/function:
  ncuStyle->SetOptFit(1);
  ncuStyle->SetFitFormat("5.4g");
  ncuStyle->SetFuncColor(2);
  ncuStyle->SetFuncStyle(1);
  ncuStyle->SetFuncWidth(1);

//For the date:
  ncuStyle->SetOptDate(0);
  // ncuStyle->SetDateX(Float_t x = 0.01);
  // ncuStyle->SetDateY(Float_t y = 0.01);

// For the statistics box:
  ncuStyle->SetOptFile(0);
  ncuStyle->SetOptStat(0); // To display the mean and RMS:   SetOptStat("mr");
  ncuStyle->SetStatColor(kWhite);
  ncuStyle->SetStatFont(42);
  ncuStyle->SetStatFontSize(0.025);
  ncuStyle->SetStatTextColor(1);
  ncuStyle->SetStatFormat("6.4g");
  ncuStyle->SetStatBorderSize(1);
  ncuStyle->SetStatH(0.1);
  ncuStyle->SetStatW(0.15);
  // ncuStyle->SetStatStyle(Style_t style = 1001);
  // ncuStyle->SetStatX(Float_t x = 0);
  // ncuStyle->SetStatY(Float_t y = 0);

// Margins:
  ncuStyle->SetPadTopMargin(0.08);
  ncuStyle->SetPadBottomMargin(0.13);
  ncuStyle->SetPadLeftMargin(0.13);
  ncuStyle->SetPadRightMargin(0.04);

// For the Global title:

  ncuStyle->SetOptTitle(0);
  ncuStyle->SetTitleFont(62);
  ncuStyle->SetTitleColor(1);
  ncuStyle->SetTitleTextColor(1);
  ncuStyle->SetTitleFillColor(10);
  ncuStyle->SetTitleFontSize(0.05);
  // ncuStyle->SetTitleH(0); // Set the height of the title box
  // ncuStyle->SetTitleW(0); // Set the width of the title box
  // ncuStyle->SetTitleX(0); // Set the position of the title box
  // ncuStyle->SetTitleY(0.985); // Set the position of the title box
  // ncuStyle->SetTitleStyle(Style_t style = 1001);
  // ncuStyle->SetTitleBorderSize(2);

// For the axis titles:
//.........这里部分代码省略.........
开发者ID:juwugit,项目名称:XtoZh,代码行数:101,代码来源:setNCUStyle.C

示例15: met

void met(){

  TStyle *tdrStyle = new TStyle("tdrStyle","Style for P-TDR");

  // For the canvas:
  tdrStyle->SetCanvasBorderMode(0);
  tdrStyle->SetCanvasColor(kWhite);
  tdrStyle->SetCanvasDefH(600); //Height of canvas
  tdrStyle->SetCanvasDefW(600); //Width of canvas
  tdrStyle->SetCanvasDefX(0);   //POsition on screen
  tdrStyle->SetCanvasDefY(0);

  // For the Pad:
  tdrStyle->SetPadBorderMode(0);
  // tdrStyle->SetPadBorderSize(Width_t size = 1);
  tdrStyle->SetPadColor(kWhite);
  tdrStyle->SetPadGridX(true);
  tdrStyle->SetPadGridY(true);
  tdrStyle->SetGridColor(0);
  tdrStyle->SetGridStyle(3);
  tdrStyle->SetGridWidth(1);

  // For the frame:
  tdrStyle->SetFrameBorderMode(0);
  tdrStyle->SetFrameBorderSize(1);
  tdrStyle->SetFrameFillColor(0);
  tdrStyle->SetFrameFillStyle(0);
  tdrStyle->SetFrameLineColor(1);
  tdrStyle->SetFrameLineStyle(1);
  tdrStyle->SetFrameLineWidth(1);

  // For the histo:
  // tdrStyle->SetHistFillColor(1);
  // tdrStyle->SetHistFillStyle(0);
  tdrStyle->SetHistLineColor(1);
  tdrStyle->SetHistLineStyle(0);
  tdrStyle->SetHistLineWidth(1);
  // tdrStyle->SetLegoInnerR(Float_t rad = 0.5);
  // tdrStyle->SetNumberContours(Int_t number = 20);

  tdrStyle->SetEndErrorSize(2);
  //  tdrStyle->SetErrorMarker(20);
  tdrStyle->SetErrorX(0.);

  tdrStyle->SetMarkerStyle(20);

  //For the fit/function:
  tdrStyle->SetOptFit(1);
  tdrStyle->SetFitFormat("5.4g");
  tdrStyle->SetFuncColor(2);
  tdrStyle->SetFuncStyle(1);
  tdrStyle->SetFuncWidth(1);

  //For the date:
  tdrStyle->SetOptDate(0);
  // tdrStyle->SetDateX(Float_t x = 0.01);
  // tdrStyle->SetDateY(Float_t y = 0.01);

  // For the statistics box:
  tdrStyle->SetOptFile(0);
  tdrStyle->SetOptStat("emr"); // To display the mean and RMS:   SetOptStat("mr");
  tdrStyle->SetStatColor(kWhite);
  tdrStyle->SetStatFont(42);
  tdrStyle->SetStatFontSize(0.025);
  tdrStyle->SetStatTextColor(1);
  tdrStyle->SetStatFormat("6.4g");
  tdrStyle->SetStatBorderSize(1);
  tdrStyle->SetStatH(0.1);
  tdrStyle->SetStatW(0.15);
  // tdrStyle->SetStatStyle(Style_t style = 1001);
  // tdrStyle->SetStatX(Float_t x = 0);
  // tdrStyle->SetStatY(Float_t y = 0);

  // Margins:
  tdrStyle->SetPadTopMargin(0.07);
  tdrStyle->SetPadBottomMargin(0.13);
  tdrStyle->SetPadLeftMargin(0.13);
  tdrStyle->SetPadRightMargin(0.05);

  // For the Global title:
  //tdrStyle->SetOptTitle(0);
  tdrStyle->SetTitleFont(35);
  tdrStyle->SetTitleColor(1);
  tdrStyle->SetTitleTextColor(1);
  tdrStyle->SetTitleFillColor(10);
  tdrStyle->SetTitleFontSize(0.045);
  // tdrStyle->SetTitleH(0); // Set the height of the title box
  // tdrStyle->SetTitleW(0); // Set the width of the title box
  tdrStyle->SetTitleX(0.15); // Set the position of the title box
  // tdrStyle->SetTitleY(0.985); // Set the position of the title box
  // tdrStyle->SetTitleStyle(Style_t style = 1001);
  tdrStyle->SetTitleBorderSize(0);

  // For the axis titles:
  tdrStyle->SetTitleColor(1, "XYZ");
  tdrStyle->SetTitleFont(42, "XYZ");
  tdrStyle->SetTitleSize(0.04, "XYZ");
  // tdrStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size?
  // tdrStyle->SetTitleYSize(Float_t size = 0.02);
  tdrStyle->SetTitleXOffset(1.05);
//.........这里部分代码省略.........
开发者ID:zdemirag,项目名称:exo-higgs,代码行数:101,代码来源:met.C


注:本文中的TStyle::SetFrameFillColor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。