本文整理汇总了C++中TStyle::SetFrameBorderSize方法的典型用法代码示例。如果您正苦于以下问题:C++ TStyle::SetFrameBorderSize方法的具体用法?C++ TStyle::SetFrameBorderSize怎么用?C++ TStyle::SetFrameBorderSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TStyle
的用法示例。
在下文中一共展示了TStyle::SetFrameBorderSize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setTDRStyle
void setTDRStyle() {
TStyle *tdrStyle = new TStyle("tdrStyle","Style for P-TDR");
tdrStyle->SetCanvasBorderMode(0);
tdrStyle->SetCanvasColor(kWhite);
tdrStyle->SetCanvasDefH(600);
tdrStyle->SetCanvasDefW(600);
tdrStyle->SetCanvasDefX(0);
tdrStyle->SetCanvasDefY(0);
tdrStyle->SetPadBorderMode(0);
tdrStyle->SetPadColor(kWhite);
tdrStyle->SetFrameBorderMode(0);
tdrStyle->SetFrameBorderSize(1);
tdrStyle->SetFrameFillColor(0);
tdrStyle->SetFrameFillStyle(0);
tdrStyle->SetFrameLineColor(1);
tdrStyle->SetFrameLineStyle(1);
tdrStyle->SetFrameLineWidth(1);
tdrStyle->SetHistLineColor(kBlack);
tdrStyle->SetHistLineStyle(0);
tdrStyle->SetHistLineWidth(1);
tdrStyle->SetEndErrorSize(2);
tdrStyle->SetErrorX(0.);
tdrStyle->SetMarkerStyle(20);
tdrStyle->SetMarkerSize(2);
tdrStyle->SetOptFit(1);
tdrStyle->SetFitFormat("5.4g");
tdrStyle->SetFuncColor(2);
tdrStyle->SetFuncStyle(1);
tdrStyle->SetFuncWidth(1);
tdrStyle->SetOptDate(0);
tdrStyle->SetOptFile(0);
tdrStyle->SetOptStat(0);
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->SetPadTopMargin(0.05);
tdrStyle->SetPadBottomMargin(0.13);
tdrStyle->SetPadLeftMargin(0.10);
tdrStyle->SetPadRightMargin(0.05);
tdrStyle->SetOptTitle(0);
tdrStyle->SetTitleFont(42);
tdrStyle->SetTitleColor(1);
tdrStyle->SetTitleTextColor(1);
tdrStyle->SetTitleFillColor(10);
tdrStyle->SetTitleFontSize(0.05);
// For the axis labels:
tdrStyle->SetLabelColor(1, "XYZ");
tdrStyle->SetLabelOffset(0.007, "XYZ");
tdrStyle->SetLabelSize(0.03, "XYZ");
tdrStyle->SetAxisColor(1, "XYZ");
tdrStyle->SetStripDecimals(kTRUE);
tdrStyle->SetTickLength(0.03, "XYZ");
tdrStyle->SetNdivisions(510, "XYZ");
tdrStyle->SetPadTickX(1);
tdrStyle->SetPadTickY(1);
tdrStyle->SetOptLogx(0);
tdrStyle->SetOptLogy(0);
tdrStyle->SetOptLogz(0);
tdrStyle->SetPaperSize(20.,20.);
tdrStyle->cd();
}
示例2: WZPaperStyle
void WZPaperStyle()
{
TStyle* WZPaperStyle = new TStyle("WZPaperStyle", "WZPaperStyle");
gStyle = WZPaperStyle;
//----------------------------------------------------------------------------
// Canvas
//----------------------------------------------------------------------------
WZPaperStyle->SetCanvasBorderMode( 0);
WZPaperStyle->SetCanvasBorderSize( 10);
WZPaperStyle->SetCanvasColor ( 0);
WZPaperStyle->SetCanvasDefH (600);
WZPaperStyle->SetCanvasDefW (550);
WZPaperStyle->SetCanvasDefX ( 10);
WZPaperStyle->SetCanvasDefY ( 10);
//----------------------------------------------------------------------------
// Pad
//----------------------------------------------------------------------------
WZPaperStyle->SetPadBorderMode ( 0);
WZPaperStyle->SetPadBorderSize ( 10);
WZPaperStyle->SetPadColor ( 0);
WZPaperStyle->SetPadBottomMargin(0.20);
WZPaperStyle->SetPadTopMargin (0.08);
WZPaperStyle->SetPadLeftMargin (0.18);
WZPaperStyle->SetPadRightMargin (0.05);
//----------------------------------------------------------------------------
// Frame
//----------------------------------------------------------------------------
WZPaperStyle->SetFrameBorderMode( 0);
WZPaperStyle->SetFrameBorderSize(10);
WZPaperStyle->SetFrameFillStyle ( 0);
WZPaperStyle->SetFrameFillColor ( 0);
WZPaperStyle->SetFrameLineColor ( 1);
WZPaperStyle->SetFrameLineStyle ( 0);
WZPaperStyle->SetFrameLineWidth ( 2);
//----------------------------------------------------------------------------
// Hist
//----------------------------------------------------------------------------
WZPaperStyle->SetHistFillColor(0);
WZPaperStyle->SetHistFillStyle(1);
WZPaperStyle->SetHistLineColor(1);
WZPaperStyle->SetHistLineStyle(0);
WZPaperStyle->SetHistLineWidth(1);
//----------------------------------------------------------------------------
// Axis
//----------------------------------------------------------------------------
WZPaperStyle->SetLabelFont ( 42, "xyz");
WZPaperStyle->SetLabelOffset(0.015, "xyz");
WZPaperStyle->SetLabelSize (0.040, "xyz");
WZPaperStyle->SetNdivisions ( 505, "xyz");
WZPaperStyle->SetTitleFont ( 42, "xyz");
WZPaperStyle->SetTitleSize (0.040, "xyz");
WZPaperStyle->SetTitleOffset( 1.15, "x");
WZPaperStyle->SetTitleOffset( 1.15, "y");
WZPaperStyle->SetPadTickX ( 1);
WZPaperStyle->SetPadTickY ( 1);
//----------------------------------------------------------------------------
// Title
//----------------------------------------------------------------------------
WZPaperStyle->SetTitleAlign ( 33);
WZPaperStyle->SetTitleBorderSize( 0);
WZPaperStyle->SetTitleFillColor ( 10);
WZPaperStyle->SetTitleFont ( 42);
WZPaperStyle->SetTitleFontSize (0.045);
WZPaperStyle->SetTitleX (0.960);
WZPaperStyle->SetTitleY (0.990);
//----------------------------------------------------------------------------
// Stat
//----------------------------------------------------------------------------
WZPaperStyle->SetOptStat ( 0);
WZPaperStyle->SetStatBorderSize( 0);
WZPaperStyle->SetStatColor ( 10);
WZPaperStyle->SetStatFont ( 42);
WZPaperStyle->SetStatX (0.94);
WZPaperStyle->SetStatY (0.91);
}
示例3: setEgammaStyle
void setEgammaStyle() {
TStyle *egammaStyle = new TStyle("egammaStyle","Style for P-TDR");
// For the palette:
egammaStyle->SetPalette(1);
// For the grid
egammaStyle->SetPadGridX(1);
egammaStyle->SetPadGridY(1);
// For the canvas:
egammaStyle->SetCanvasBorderMode(0);
egammaStyle->SetCanvasBorderSize(2);
egammaStyle->SetCanvasColor(0);
//egammaStyle->SetCanvasDefH(600);
//egammaStyle->SetCanvasDefW(600);
egammaStyle->SetCanvasDefX(0);
egammaStyle->SetCanvasDefY(0);
// For the pad:
egammaStyle->SetPadBorderMode(0);
egammaStyle->SetPadColor(kWhite);
egammaStyle->SetPadGridX(false);
egammaStyle->SetPadGridY(false);
egammaStyle->SetGridColor(0);
egammaStyle->SetGridStyle(3);
egammaStyle->SetGridWidth(1);
// For the frame:
egammaStyle->SetFrameBorderMode(0);
egammaStyle->SetFrameBorderSize(1);
egammaStyle->SetFrameFillColor(0);
egammaStyle->SetFrameFillStyle(0);
egammaStyle->SetFrameLineColor(1);
egammaStyle->SetFrameLineStyle(1);
egammaStyle->SetFrameLineWidth(1);
// For the histos:
egammaStyle->SetHistLineColor(1);
egammaStyle->SetHistLineStyle(0);
egammaStyle->SetHistLineWidth(2); // chiara: era 1
egammaStyle->SetEndErrorSize(2);
egammaStyle->SetErrorX(0.);
// for the graphs
egammaStyle->SetMarkerColor(1);
egammaStyle->SetMarkerStyle(20);
egammaStyle->SetMarkerSize(1.1); // chiara: era 1.2
// For the fit/function:
egammaStyle->SetOptFit(1);
egammaStyle->SetFitFormat("5.4g");
egammaStyle->SetFuncColor(2);
egammaStyle->SetFuncStyle(1);
egammaStyle->SetFuncWidth(2); // chiara: era 1
//For the date:
egammaStyle->SetOptDate(0);
// For the statistics box:
egammaStyle->SetOptFile(0);
egammaStyle->SetOptStat(0); // To display the mean and RMS: SetOptStat("mr");
egammaStyle->SetStatColor(kWhite);
egammaStyle->SetStatFont(42);
egammaStyle->SetStatFontSize(0.025);
egammaStyle->SetStatTextColor(1);
egammaStyle->SetStatFormat("6.4g");
egammaStyle->SetStatBorderSize(1);
egammaStyle->SetStatH(0.1);
egammaStyle->SetStatW(0.15);
// For the Global title:
egammaStyle->SetOptTitle(1); // 0=No Title
egammaStyle->SetTitleFont(42);
egammaStyle->SetTitleColor(1);
egammaStyle->SetTitleTextColor(1);
egammaStyle->SetTitleFillColor(10);
egammaStyle->SetTitleFontSize(0.05);
// For the axis titles:
egammaStyle->SetTitleColor(1, "XYZ");
egammaStyle->SetTitleFont(42, "XYZ");
egammaStyle->SetTitleSize(0.05, "XYZ"); // chiara: era 0.06
// egammaStyle->SetTitleXOffset(0.9); // chiara
// egammaStyle->SetTitleYOffset(1.25); // chiara
// For the axis labels:
egammaStyle->SetLabelColor(1, "XYZ");
egammaStyle->SetLabelFont(42, "XYZ");
egammaStyle->SetLabelOffset(0.007, "XYZ"); // chiara
egammaStyle->SetLabelSize(0.04, "XYZ"); // chiara: era 0.05
// For the axis:
egammaStyle->SetAxisColor(1, "XYZ");
egammaStyle->SetStripDecimals(kTRUE);
egammaStyle->SetTickLength(0.03, "XYZ");
egammaStyle->SetNdivisions(510, "XYZ");
egammaStyle->SetPadTickX(0); // 0=Text labels (and tics) only on bottom, 1=Text labels on top and bottom
egammaStyle->SetPadTickY(1);
//.........这里部分代码省略.........
示例4: LatinoStyle2
void LatinoStyle2()
{
TStyle* GloStyle;
GloStyle = gStyle;
(void)GloStyle;
TStyle* LatinosStyle = new TStyle("LatinosStyle", "LatinosStyle");
gStyle = LatinosStyle;
//----------------------------------------------------------------------------
// Canvas
//----------------------------------------------------------------------------
LatinosStyle->SetCanvasBorderMode( 0);
LatinosStyle->SetCanvasBorderSize( 10);
LatinosStyle->SetCanvasColor ( 0);
LatinosStyle->SetCanvasDefH (794);
LatinosStyle->SetCanvasDefW (550);
LatinosStyle->SetCanvasDefX ( 10);
LatinosStyle->SetCanvasDefY ( 10);
//----------------------------------------------------------------------------
// Pad
//----------------------------------------------------------------------------
LatinosStyle->SetPadBorderMode ( 0);
LatinosStyle->SetPadBorderSize ( 10);
LatinosStyle->SetPadColor ( 0);
LatinosStyle->SetPadBottomMargin(0.20);
LatinosStyle->SetPadTopMargin (0.08);
LatinosStyle->SetPadLeftMargin (0.18);
LatinosStyle->SetPadRightMargin (0.05);
//----------------------------------------------------------------------------
// Frame
//----------------------------------------------------------------------------
LatinosStyle->SetFrameFillStyle ( 0);
LatinosStyle->SetFrameFillColor ( 0);
LatinosStyle->SetFrameLineColor ( 1);
LatinosStyle->SetFrameLineStyle ( 0);
LatinosStyle->SetFrameLineWidth ( 2);
LatinosStyle->SetFrameBorderMode( 0);
LatinosStyle->SetFrameBorderSize(10);
//----------------------------------------------------------------------------
// Hist
//----------------------------------------------------------------------------
LatinosStyle->SetHistFillColor(0);
LatinosStyle->SetHistFillStyle(1);
LatinosStyle->SetHistLineColor(1);
LatinosStyle->SetHistLineStyle(0);
LatinosStyle->SetHistLineWidth(1);
//----------------------------------------------------------------------------
// Axis
//----------------------------------------------------------------------------
LatinosStyle->SetLabelFont ( 42, "xyz");
LatinosStyle->SetLabelOffset(0.015, "xyz");
LatinosStyle->SetLabelSize (0.050, "xyz");
LatinosStyle->SetNdivisions ( 505, "xyz");
LatinosStyle->SetTitleFont ( 42, "xyz");
LatinosStyle->SetTitleSize (0.050, "xyz");
// LatinosStyle->SetNdivisions ( -503, "y");
LatinosStyle->SetTitleOffset( 1.4, "x");
LatinosStyle->SetTitleOffset( 1.2, "y");
LatinosStyle->SetPadTickX ( 1); // Tick marks on the opposite side of the frame
LatinosStyle->SetPadTickY ( 1); // Tick marks on the opposite side of the frame
//----------------------------------------------------------------------------
// Title
//----------------------------------------------------------------------------
LatinosStyle->SetTitleBorderSize( 0);
LatinosStyle->SetTitleFillColor ( 10);
LatinosStyle->SetTitleAlign ( 12);
LatinosStyle->SetTitleFontSize (0.045);
LatinosStyle->SetTitleX (0.590);
LatinosStyle->SetTitleY (0.830);
LatinosStyle->SetTitleFont(42, "");
//----------------------------------------------------------------------------
// Stat
//----------------------------------------------------------------------------
LatinosStyle->SetOptStat (1110);
LatinosStyle->SetStatBorderSize( 0);
LatinosStyle->SetStatColor ( 10);
LatinosStyle->SetStatFont ( 42);
LatinosStyle->SetStatX (0.94);
LatinosStyle->SetStatY (0.91);
const Int_t NRGBs = 5;
const Int_t NCont = 255;
//.........这里部分代码省略.........
示例5: 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();
}
示例6: setStyle
void setStyle() {
// set the TStyle
TStyle* style = new TStyle("DrawBaseStyle", "");
style->SetCanvasColor(0);
style->SetPadColor(0);
style->SetFrameFillColor(0);
style->SetStatColor(0);
style->SetOptStat(0);
style->SetTitleFillColor(0);
style->SetCanvasBorderMode(0);
style->SetPadBorderMode(0);
style->SetFrameBorderMode(0);
style->SetPadBottomMargin(0.12);
style->SetPadLeftMargin(0.12);
style->cd();
// For the canvas:
style->SetCanvasBorderMode(0);
style->SetCanvasColor(kWhite);
style->SetCanvasDefH(600); //Height of canvas
style->SetCanvasDefW(600); //Width of canvas
style->SetCanvasDefX(0); //POsition on screen
style->SetCanvasDefY(0);
// For the Pad:
style->SetPadBorderMode(0);
style->SetPadColor(kWhite);
style->SetPadGridX(false);
style->SetPadGridY(false);
style->SetGridColor(0);
style->SetGridStyle(3);
style->SetGridWidth(1);
// For the frame:
style->SetFrameBorderMode(0);
style->SetFrameBorderSize(1);
style->SetFrameFillColor(0);
style->SetFrameFillStyle(0);
style->SetFrameLineColor(1);
style->SetFrameLineStyle(1);
style->SetFrameLineWidth(1);
// Margins:
style->SetPadTopMargin(0.05);
style->SetPadBottomMargin(0.15);//0.13);
style->SetPadLeftMargin(0.15);//0.16);
style->SetPadRightMargin(0.05);//0.02);
// For the Global title:
style->SetOptTitle(0);
style->SetTitleFont(42);
style->SetTitleColor(1);
style->SetTitleTextColor(1);
style->SetTitleFillColor(10);
style->SetTitleFontSize(0.05);
// For the axis titles:
style->SetTitleColor(1, "XYZ");
style->SetTitleFont(42, "XYZ");
style->SetTitleSize(0.05, "XYZ");
style->SetTitleXOffset(1.15);//0.9);
style->SetTitleYOffset(1.3); // => 1.15 if exponents
// For the axis labels:
style->SetLabelColor(1, "XYZ");
style->SetLabelFont(42, "XYZ");
style->SetLabelOffset(0.007, "XYZ");
style->SetLabelSize(0.045, "XYZ");
// For the axis:
style->SetAxisColor(1, "XYZ");
style->SetStripDecimals(kTRUE);
style->SetTickLength(0.03, "XYZ");
style->SetNdivisions(510, "XYZ");
style->SetPadTickX(1); // To get tick marks on the opposite side of the frame
style->SetPadTickY(1);
// for histograms:
style->SetHistLineColor(0);
style->cd();
}
示例7: 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);
//.........这里部分代码省略.........
示例8: 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;
}
示例9: setHHStyle
void setHHStyle(TStyle& HHStyle)
{
const int fontstyle=42;
HHStyle.SetPalette(1);
// ==============
// Canvas
// ==============
HHStyle.SetCanvasBorderMode(0);
HHStyle.SetCanvasColor(kWhite);
HHStyle.SetCanvasDefH(600); //Height of canvas
HHStyle.SetCanvasDefW(600); //Width of canvas
HHStyle.SetCanvasDefX(0); //Position on screen
HHStyle.SetCanvasDefY(0);
// ==============
// Pad
// ==============
HHStyle.SetPadBorderMode(0);
// HHStyle.SetPadBorderSize(Width_t size = 1);
HHStyle.SetPadColor(kWhite);
HHStyle.SetPadGridX(false);
HHStyle.SetPadGridY(false);
HHStyle.SetGridColor(kGray);
HHStyle.SetGridStyle(3);
HHStyle.SetGridWidth(1);
// ==============
// Frame
// ==============
HHStyle.SetFrameBorderMode(0);
HHStyle.SetFrameBorderSize(1);
HHStyle.SetFrameFillColor(0);
HHStyle.SetFrameFillStyle(0);
HHStyle.SetFrameLineColor(1);
HHStyle.SetFrameLineStyle(1);
HHStyle.SetFrameLineWidth(1);
// ==============
// Histo
// ==============
HHStyle.SetErrorX(0.0);
HHStyle.SetEndErrorSize(8);
// HHStyle.SetHistFillColor(1);
// HHStyle.SetHistFillStyle(0);
// HHStyle.SetHistLineColor(1);
HHStyle.SetHistLineStyle(0);
HHStyle.SetHistLineWidth(1);
// HHStyle.SetLegoInnerR(Float_t rad = 0.5);
// HHStyle.SetNumberContours(Int_t number = 20);
// HHStyle.SetErrorMarker(20);
HHStyle.SetMarkerStyle(20);
// ==============
// Fit/function
// ==============
HHStyle.SetOptFit(0);
HHStyle.SetFitFormat("5.4g");
HHStyle.SetFuncColor(2);
HHStyle.SetFuncStyle(1);
HHStyle.SetFuncWidth(1);
// ==============
// Date
// ==============
HHStyle.SetOptDate(0);
// HHStyle.SetDateX(Float_t x = 0.01);
// HHStyle.SetDateY(Float_t y = 0.01);
// =====================
// Statistics Box
// =====================
HHStyle.SetOptFile(0);
HHStyle.SetOptStat(0); // To display the mean and RMS: SetOptStat("mr");
HHStyle.SetStatColor(kWhite);
HHStyle.SetStatFont(fontstyle);
HHStyle.SetStatFontSize(0.025);
HHStyle.SetStatTextColor(1);
HHStyle.SetStatFormat("6.4g");
HHStyle.SetStatBorderSize(1);
HHStyle.SetStatH(0.1);
HHStyle.SetStatW(0.15);
// HHStyle.SetStatStyle(Style_t style = 1001);
// HHStyle.SetStatX(Float_t x = 0);
// HHStyle.SetStatY(Float_t y = 0);
// ==============
// Margins
// ==============
//.........这里部分代码省略.........
示例10: 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);
//.........这里部分代码省略.........
示例11: 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?
//.........这里部分代码省略.........
示例12: 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);
}
示例13: 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);
//.........这里部分代码省略.........
示例14: 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->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(63);
// 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(0);
tdrStyle->SetErrorX(0.);
// tdrStyle->SetErrorMarker(20);
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.13);
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);
// 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.06, "XYZ");
// tdrStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size?
// tdrStyle->SetTitleYSize(Float_t size = 0.02);
//.........这里部分代码省略.........
示例15: ChargeRatioStyle
void ChargeRatioStyle()
{
TStyle* GloStyle;
GloStyle = gStyle;
TStyle* ChargeRatioStyle = new TStyle("ChargeRatioStyle", "ChargeRatioStyle");
gStyle = ChargeRatioStyle;
//----------------------------------------------------------------------------
// Canvas
//----------------------------------------------------------------------------
ChargeRatioStyle->SetCanvasBorderMode( 0);
ChargeRatioStyle->SetCanvasBorderSize( 10);
ChargeRatioStyle->SetCanvasColor ( 0);
ChargeRatioStyle->SetCanvasDefH (600);
ChargeRatioStyle->SetCanvasDefW (550);
ChargeRatioStyle->SetCanvasDefX ( 10);
ChargeRatioStyle->SetCanvasDefY ( 10);
//----------------------------------------------------------------------------
// Pad
//----------------------------------------------------------------------------
ChargeRatioStyle->SetPadBorderMode ( 0);
ChargeRatioStyle->SetPadBorderSize ( 10);
ChargeRatioStyle->SetPadColor ( 0);
ChargeRatioStyle->SetPadBottomMargin(0.20);
ChargeRatioStyle->SetPadTopMargin (0.08);
ChargeRatioStyle->SetPadLeftMargin (0.18);
ChargeRatioStyle->SetPadRightMargin (0.05);
//----------------------------------------------------------------------------
// Frame
//----------------------------------------------------------------------------
ChargeRatioStyle->SetFrameFillStyle ( 0);
ChargeRatioStyle->SetFrameFillColor ( 0);
ChargeRatioStyle->SetFrameLineColor ( 1);
ChargeRatioStyle->SetFrameLineStyle ( 0);
ChargeRatioStyle->SetFrameLineWidth ( 2);
ChargeRatioStyle->SetFrameBorderMode( 0);
ChargeRatioStyle->SetFrameBorderSize(10);
//----------------------------------------------------------------------------
// Hist
//----------------------------------------------------------------------------
ChargeRatioStyle->SetHistFillColor(0);
ChargeRatioStyle->SetHistFillStyle(1);
ChargeRatioStyle->SetHistLineColor(1);
ChargeRatioStyle->SetHistLineStyle(0);
ChargeRatioStyle->SetHistLineWidth(1);
//----------------------------------------------------------------------------
// Axis
//----------------------------------------------------------------------------
ChargeRatioStyle->SetLabelFont ( 42, "xyz");
ChargeRatioStyle->SetLabelOffset(0.015, "xyz");
ChargeRatioStyle->SetLabelSize (0.050, "xyz");
ChargeRatioStyle->SetNdivisions ( 505, "xyz");
ChargeRatioStyle->SetTitleFont ( 42, "xyz");
ChargeRatioStyle->SetTitleSize (0.050, "xyz");
// ChargeRatioStyle->SetNdivisions ( -503, "y");
ChargeRatioStyle->SetTitleOffset( 1.4, "x");
ChargeRatioStyle->SetTitleOffset( 1.2, "y");
ChargeRatioStyle->SetPadTickX ( 1); // Tick marks on the opposite side of the frame
ChargeRatioStyle->SetPadTickY ( 1); // Tick marks on the opposite side of the frame
//----------------------------------------------------------------------------
// Title
//----------------------------------------------------------------------------
ChargeRatioStyle->SetTitleBorderSize( 0);
ChargeRatioStyle->SetTitleFillColor (10);
ChargeRatioStyle->SetTitleFont (42, "");
ChargeRatioStyle->SetTitleAlign ( 33);
ChargeRatioStyle->SetTitleFontSize(0.045);
ChargeRatioStyle->SetTitleX (0.560);
ChargeRatioStyle->SetTitleY (0.890);
// ChargeRatioStyle->SetTitleX (0.940);
// ChargeRatioStyle->SetTitleY (0.990);
//----------------------------------------------------------------------------
// Stat
//----------------------------------------------------------------------------
ChargeRatioStyle->SetOptStat (1110);
ChargeRatioStyle->SetStatBorderSize( 0);
ChargeRatioStyle->SetStatColor ( 10);
ChargeRatioStyle->SetStatFont ( 42);
ChargeRatioStyle->SetStatX (0.94);
ChargeRatioStyle->SetStatY (0.91);
return();
}