本文整理汇总了C++中TStyle::SetAxisColor方法的典型用法代码示例。如果您正苦于以下问题:C++ TStyle::SetAxisColor方法的具体用法?C++ TStyle::SetAxisColor怎么用?C++ TStyle::SetAxisColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TStyle
的用法示例。
在下文中一共展示了TStyle::SetAxisColor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Style_Toby_2
void Style_Toby_2()
{
// Add the saved style to the current ROOT session.
delete gROOT->GetStyle("Toby_2");
TStyle *tmpStyle = new TStyle("Toby_2", "Style for posters and talks");
tmpStyle->SetNdivisions(510, "x");
tmpStyle->SetNdivisions(510, "y");
tmpStyle->SetNdivisions(510, "z");
tmpStyle->SetAxisColor(1, "x");
tmpStyle->SetAxisColor(1, "y");
tmpStyle->SetAxisColor(1, "z");
tmpStyle->SetLabelColor(1, "x");
tmpStyle->SetLabelColor(1, "y");
tmpStyle->SetLabelColor(1, "z");
tmpStyle->SetLabelFont(42, "x");
tmpStyle->SetLabelFont(42, "y");
tmpStyle->SetLabelFont(42, "z");
tmpStyle->SetLabelOffset(0.005, "x");
tmpStyle->SetLabelOffset(0.005, "y");
tmpStyle->SetLabelOffset(0.005, "z");
tmpStyle->SetLabelSize(0.035, "x");
tmpStyle->SetLabelSize(0.035, "y");
tmpStyle->SetLabelSize(0.035, "z");
tmpStyle->SetTickLength(0.03, "x");
tmpStyle->SetTickLength(0.03, "y");
tmpStyle->SetTickLength(0.03, "z");
tmpStyle->SetTitleOffset(1, "x");
tmpStyle->SetTitleOffset(1, "y");
tmpStyle->SetTitleOffset(1, "z");
tmpStyle->SetTitleSize(0.035, "x");
tmpStyle->SetTitleSize(0.035, "y");
tmpStyle->SetTitleSize(0.035, "z");
tmpStyle->SetTitleColor(1, "x");
tmpStyle->SetTitleColor(1, "y");
tmpStyle->SetTitleColor(1, "z");
tmpStyle->SetTitleFont(42, "x");
tmpStyle->SetTitleFont(42, "y");
tmpStyle->SetTitleFont(42, "z");
tmpStyle->SetBarWidth(1);
tmpStyle->SetBarOffset(0);
tmpStyle->SetDrawBorder(0);
tmpStyle->SetOptLogx(0);
tmpStyle->SetOptLogy(0);
tmpStyle->SetOptLogz(0);
tmpStyle->SetOptDate(0);
tmpStyle->SetOptStat(111);
tmpStyle->SetOptTitle(kTRUE);
tmpStyle->SetOptFit(0);
tmpStyle->SetNumberContours(20);
tmpStyle->GetAttDate()->SetTextFont(62);
tmpStyle->GetAttDate()->SetTextSize(0.025);
tmpStyle->GetAttDate()->SetTextAngle(0);
tmpStyle->GetAttDate()->SetTextAlign(11);
tmpStyle->GetAttDate()->SetTextColor(1);
tmpStyle->SetDateX(0.01);
tmpStyle->SetDateY(0.01);
tmpStyle->SetEndErrorSize(2);
tmpStyle->SetErrorX(0.5);
tmpStyle->SetFuncColor(2);
tmpStyle->SetFuncStyle(1);
tmpStyle->SetFuncWidth(2);
tmpStyle->SetGridColor(0);
tmpStyle->SetGridStyle(3);
tmpStyle->SetGridWidth(1);
tmpStyle->SetLegendBorderSize(1);
tmpStyle->SetLegendFillColor(0);
tmpStyle->SetLegendFont(42);
tmpStyle->SetHatchesLineWidth(1);
tmpStyle->SetHatchesSpacing(1);
tmpStyle->SetFrameFillColor(0);
tmpStyle->SetFrameLineColor(1);
tmpStyle->SetFrameFillStyle(1001);
tmpStyle->SetFrameLineStyle(1);
tmpStyle->SetFrameLineWidth(1);
tmpStyle->SetFrameBorderSize(1);
tmpStyle->SetFrameBorderMode(0);
tmpStyle->SetHistFillColor(0);
tmpStyle->SetHistLineColor(602);
tmpStyle->SetHistFillStyle(1001);
tmpStyle->SetHistLineStyle(1);
tmpStyle->SetHistLineWidth(1);
tmpStyle->SetHistMinimumZero(kFALSE);
tmpStyle->SetCanvasPreferGL(kFALSE);
tmpStyle->SetCanvasColor(0);
tmpStyle->SetCanvasBorderSize(2);
tmpStyle->SetCanvasBorderMode(0);
tmpStyle->SetCanvasDefH(500);
tmpStyle->SetCanvasDefW(700);
tmpStyle->SetCanvasDefX(10);
tmpStyle->SetCanvasDefY(10);
tmpStyle->SetPadColor(0);
tmpStyle->SetPadBorderSize(2);
tmpStyle->SetPadBorderMode(0);
tmpStyle->SetPadBottomMargin(0.1);
tmpStyle->SetPadTopMargin(0.1);
tmpStyle->SetPadLeftMargin(0.1);
tmpStyle->SetPadRightMargin(0.1);
tmpStyle->SetPadGridX(kFALSE);
//.........这里部分代码省略.........
示例2: set_plot_style
void set_plot_style() {
TStyle* style = new TStyle("style", "Style for P-TDR");
// For the canvas:
style->SetCanvasBorderMode(0);
style->SetCanvasColor(kWhite);
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(kBlack);
style->SetGridStyle(3);
style->SetGridWidth(1);
// For the frame:
style->SetFrameBorderMode(0);
style->SetFrameBorderSize(1);
style->SetFrameFillColor(kWhite);
style->SetFrameFillStyle(0);
style->SetFrameLineColor(kBlack);
style->SetFrameLineStyle(1);
style->SetFrameLineWidth(1);
// For the histo:
// style->SetHistFillColor(1);
style->SetHistFillStyle(0); //
style->SetHistLineColor(kBlack);
style->SetHistLineStyle(0);
style->SetHistLineWidth(1);
style->SetEndErrorSize(2);
style->SetErrorX(0.);
style->SetMarkerStyle(20);
//For the fit/function:
style->SetOptFit(1);
style->SetFitFormat("5.4g");
style->SetFuncColor(kRed);
style->SetFuncStyle(1);
style->SetFuncWidth(1);
//For the date:
style->SetOptDate(0);
// For the statistics box:
style->SetOptFile(0);
style->SetOptStat(0); // To display the mean and RMS: SetOptStat("mr");
style->SetStatColor(kWhite);
style->SetStatFont(42);
style->SetStatFontSize(0.025);
style->SetStatTextColor(kBlack);
style->SetStatFormat("6.4g");
style->SetStatBorderSize(1);
style->SetStatH(0.1);
style->SetStatW(0.15);
// Margins:
style->SetPadTopMargin(1 - 0.95);
style->SetPadBottomMargin(0.1);
style->SetPadLeftMargin(0.12);
style->SetPadRightMargin(1 - 0.96);
// For the Global title:
style->SetOptTitle(0);
style->SetTitleFont(42);
style->SetTitleColor(kBlack);
style->SetTitleTextColor(kBlack);
style->SetTitleFillColor(kWhite); //10 is roughly kWhite, 10% grey?
style->SetTitleFontSize(0.05);
// For the axis titles:
style->SetTitleColor(kBlack, "XYZ");
style->SetTitleFont(42, "XYZ");
style->SetTitleSize(0.06, "XYZ");
style->SetTitleXOffset(0.9);
style->SetTitleYOffset(1.25);
// For the axis labels:
style->SetLabelColor(kBlack, "XYZ");
style->SetLabelFont(42, "XYZ");
style->SetLabelOffset(0.007, "XYZ");
style->SetLabelSize(0.05, "XYZ");
// For the axis:
style->SetAxisColor(kBlack, "XYZ");
style->SetStripDecimals(true);
style->SetTickLength(0.03, "XYZ");
style->SetNdivisions(510, "XYZ");
style->SetPadTickX(true); // To get tick marks on the opposite side of the frame
style->SetPadTickY(true);
// Change for log plots:
style->SetOptLogx(false);
style->SetOptLogy(false);
style->SetOptLogz(false);
//.........这里部分代码省略.........
示例3: getFormalStyle
//.........这里部分代码省略.........
// formalStyle->SetHistFillStyle(0);
formalStyle->SetHistLineColor(1);
formalStyle->SetHistLineStyle(0);
formalStyle->SetHistLineWidth(1);
// formalStyle->SetLegoInnerR(Float_t rad = 0.5);
// formalStyle->SetNumberContours(Int_t number = 20);
formalStyle->SetEndErrorSize(2);
//formalStyle->SetErrorMarker(20);
formalStyle->SetErrorX(0.);
formalStyle->SetMarkerStyle(20);
//For the fit/function:
//********************
formalStyle->SetOptFit(1);
formalStyle->SetFitFormat("5.4g");
formalStyle->SetFuncColor(2);
formalStyle->SetFuncStyle(1);
formalStyle->SetFuncWidth(1);
//For the date:
//********************
formalStyle->SetOptDate(0);
// formalStyle->SetDateX(Float_t x = 0.01);
// formalStyle->SetDateY(Float_t y = 0.01);
// For the statistics box:
//********************
formalStyle->SetOptFile(0);
formalStyle->SetOptStat(0); // stats box
formalStyle->SetOptFit(0000); // fit box
formalStyle->SetStatColor(kWhite);
formalStyle->SetStatFont(42);
formalStyle->SetStatFontSize(0.025);
formalStyle->SetStatTextColor(1);
formalStyle->SetStatFormat("6.4g");
formalStyle->SetStatBorderSize(1);
formalStyle->SetStatH(0.1);
formalStyle->SetStatW(0.15);
// formalStyle->SetStatStyle(Style_t style = 1001);
// formalStyle->SetStatX(Float_t x = 0);
// formalStyle->SetStatY(Float_t y = 0);
// Margins:
//********************
formalStyle->SetPadTopMargin(0.15);
formalStyle->SetPadBottomMargin(0.13);
formalStyle->SetPadLeftMargin(0.13);
formalStyle->SetPadRightMargin(0.15);
// For the Global title:
//********************
// formalStyle->SetOptTitle(0);
formalStyle->SetTitleFont(42);
formalStyle->SetTitleColor(1);
formalStyle->SetTitleTextColor(1);
formalStyle->SetTitleFillColor(10);
formalStyle->SetTitleFontSize(0.05);
// formalStyle->SetTitleH(0); // Set the height of the title box
// formalStyle->SetTitleW(0); // Set the width of the title box
// formalStyle->SetTitleX(0); // Set the position of the title box
// formalStyle->SetTitleY(0.985); // Set the position of the title box
// formalStyle->SetTitleStyle(Style_t style = 1001);
// formalStyle->SetTitleBorderSize(2);
// For the axis titles:
//********************
formalStyle->SetTitleColor(1, "XYZ");
formalStyle->SetTitleFont(42, "XYZ");
formalStyle->SetTitleSize(0.06, "XYZ");
// formalStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size?
// formalStyle->SetTitleYSize(Float_t size = 0.02);
formalStyle->SetTitleXOffset(1.2);
formalStyle->SetTitleYOffset(1.2);
// For the axis labels:
//********************
// formalStyle->SetLabelColor(1, "XYZ");
// formalStyle->SetLabelFont(42, "XYZ");
// formalStyle->SetLabelOffset(0.007, "XYZ");
// formalStyle->SetLabelSize(0.05, "XYZ");
// For the axis:
//********************
formalStyle->SetAxisColor(1, "XYZ");
// formalStyle->SetStripDecimals(kTRUE);
// formalStyle->SetTickLength(0.03, "XYZ");
// formalStyle->SetNdivisions(510, "XYZ");
// formalStyle->SetPadTickX(1); // To get tick marks on the opposite side of the frame
// formalStyle->SetPadTickY(1);
// Change for log plots:
formalStyle->SetOptLogx(0);
formalStyle->SetOptLogy(0);
formalStyle->SetOptLogz(0);
formalStyle->SetPalette(1,0);
formalStyle->cd();
} //end of: void getTStyle(void){
示例4: 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(1);
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();
}
示例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: teenyWeenyBtagEffCalculation
//.........这里部分代码省略.........
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?
// tdrStyle->SetTitleYSize(Float_t size = 0.02);
tdrStyle->SetTitleXOffset(0.9);
tdrStyle->SetTitleYOffset(1.25);
// tdrStyle->SetTitleOffset(1.1, "Y"); // Another way to set the Offset
// tdrStyle->SetTitleOffset(.3, "X"); // Another way to set the Offset
// tdrStyle->SetTitleOffset(1., "Y"); // Another way to set the Offset
//
// 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);
// Change for log plots:
tdrStyle->SetOptLogx(0);
tdrStyle->SetOptLogy(0);
tdrStyle->SetOptLogz(0);
// Postscript options:
tdrStyle->SetPaperSize(20.,20.);
// tdrStyle->SetLineScalePS(Float_t scale = 3);
// tdrStyle->SetLineStyleString(Int_t i, const char* text);
// tdrStyle->SetHeaderPS(const char* header);
// tdrStyle->SetTitlePS(const char* pstitle);
// tdrStyle->SetBarOffset(Float_t baroff = 0.5);
// tdrStyle->SetBarWidth(Float_t barwidth = 0.5);
// tdrStyle->SetPaintTextFormat(const char* format = "g");
// tdrStyle->SetPalette(Int_t ncolors = 0, Int_t* colors = 0);
// tdrStyle->SetTimeOffset(Double_t toffset);
// tdrStyle->SetHistMinimumZero(kTRUE);
tdrStyle->cd();
// Meat of the stuff
//
// ned in current scope (tmpfile):1:
// (const int)0
示例7: setTDRStyle
/////
// Set setTDRStyle_modified (from link https://twiki.cern.ch/twiki/pub/CMS/TRK10001/setTDRStyle_modified.C)
/////
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(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(0);
tdrStyle->SetHistLineColor(1);
tdrStyle->SetHistLineStyle(0);
tdrStyle->SetHistLineWidth(1);
tdrStyle->SetErrorX(0.);
tdrStyle->SetMarkerStyle(20);
//For the fit/function:
tdrStyle->SetOptFit(1);
tdrStyle->SetFitFormat("5.4g");
tdrStyle->SetFuncStyle(1);
tdrStyle->SetFuncWidth(1);
//For the date:
tdrStyle->SetOptDate(0);
// For the statistics box:
tdrStyle->SetOptFile(0);
tdrStyle->SetOptStat("e");
tdrStyle->SetStatColor(kGray);
tdrStyle->SetStatFont(42);
tdrStyle->SetStatTextColor(1);
tdrStyle->SetStatFormat("6.4g");
tdrStyle->SetStatBorderSize(0);
tdrStyle->SetStatX(1.); //Starting position on X axis
tdrStyle->SetStatY(1.); //Starting position on Y axis
tdrStyle->SetStatFontSize(0.025); //Vertical Size
tdrStyle->SetStatW(0.15); //Horizontal size
// tdrStyle->SetStatStyle(Style_t style = 1001);
// Margins:
tdrStyle->SetPadTopMargin(0.05);
tdrStyle->SetPadBottomMargin(0.125);
tdrStyle->SetPadLeftMargin(0.105);
tdrStyle->SetPadRightMargin(0.1);
// 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.05, "XYZ");
tdrStyle->SetTitleXOffset(0.9);
tdrStyle->SetTitleYOffset(0.8);
tdrStyle->SetTitleOffset(0.7, "Y"); // Another way to set the Offset
// For the axis labels:
tdrStyle->SetLabelColor(1, "XYZ");
tdrStyle->SetLabelFont(42, "XYZ");
tdrStyle->SetLabelOffset(0.007, "XYZ");
tdrStyle->SetLabelSize(0.045, "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);
//.........这里部分代码省略.........
示例8: setHHStyle
//.........这里部分代码省略.........
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
// ==============
HHStyle.SetPadTopMargin(0.1);
HHStyle.SetPadBottomMargin(0.15);
HHStyle.SetPadLeftMargin(0.20);
HHStyle.SetPadRightMargin(0.05);
// ==============
// Global Title
// ==============
HHStyle.SetOptTitle(0);
HHStyle.SetTitleFont(fontstyle);
HHStyle.SetTitleColor(1);
HHStyle.SetTitleTextColor(1);
HHStyle.SetTitleFillColor(10);
HHStyle.SetTitleFontSize(0.05);
// HHStyle.SetTitleH(0); // Set the height of the title box
// HHStyle.SetTitleW(0); // Set the width of the title box
// HHStyle.SetTitleX(0); // Set the position of the title box
// HHStyle.SetTitleY(0.985); // Set the position of the title box
// HHStyle.SetTitleStyle(Style_t style = 1001);
// HHStyle.SetTitleBorderSize(2);
// ==============
// Axis titles
// ==============
HHStyle.SetTitleColor(1, "XYZ");
HHStyle.SetTitleFont(fontstyle, "XYZ");
HHStyle.SetTitleSize(0.05, "XYZ");
// HHStyle.SetTitleXSize(Float_t size = 0.02); // Another way to set the size?
// HHStyle.SetTitleYSize(Float_t size = 0.02);
HHStyle.SetTitleXOffset(1.0);
HHStyle.SetTitleYOffset(1.7);
// HHStyle.SetTitleOffset(1.1, "Y"); // Another way to set the Offset
// ==============
// Axis Label
// ==============
//HHStyle.SetLabelColor(1, "XYZ");
HHStyle.SetLabelFont(fontstyle, "XYZ");
HHStyle.SetLabelOffset(0.007, "XYZ");
HHStyle.SetLabelSize(0.04, "XYZ");
// ==============
// Axis
// ==============
HHStyle.SetAxisColor(1, "XYZ");
HHStyle.SetStripDecimals(kTRUE);
HHStyle.SetTickLength(0.03, "XYZ");
HHStyle.SetNdivisions(510, "XYZ");
HHStyle.SetPadTickX(1); // To get tick marks on the opposite side of the frame
HHStyle.SetPadTickY(1);
// Change for log plots:
HHStyle.SetOptLogx(0);
HHStyle.SetOptLogy(0);
HHStyle.SetOptLogz(0);
// ==============
// Text
// ==============
HHStyle.SetTextAlign(11);
HHStyle.SetTextAngle(0);
HHStyle.SetTextColor(1);
HHStyle.SetTextFont(fontstyle);
HHStyle.SetTextSize(0.05);
// =====================
// Postscript options:
// =====================
HHStyle.SetPaperSize(20.,20.);
// HHStyle.SetLineScalePS(Float_t scale = 3);
// HHStyle.SetLineStyleString(Int_t i, const char* text);
// HHStyle.SetHeaderPS(const char* header);
// HHStyle.SetTitlePS(const char* pstitle);
// HHStyle.SetBarOffset(Float_t baroff = 0.5);
// HHStyle.SetBarWidth(Float_t barwidth = 0.5);
// HHStyle.SetPaintTextFormat(const char* format = "g");
// HHStyle.SetPalette(Int_t ncolors = 0, Int_t* colors = 0);
// HHStyle.SetTimeOffset(Double_t toffset);
// HHStyle.SetHistMinimumZero(kTRUE);
}
示例9: 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();
}
示例10: 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);
//.........这里部分代码省略.........
示例11: met
//.........这里部分代码省略.........
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);
tdrStyle->SetTitleYOffset(1.45);
// tdrStyle->SetTitleOffset(1.1, "Y"); // Another way to set the Offset
// 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);
tdrStyle->SetOptLogz(0);
// Postscript options:
tdrStyle->SetPaperSize(20.,20.);
// tdrStyle->SetLineScalePS(Float_t scale = 3);
// tdrStyle->SetLineStyleString(Int_t i, const char* text);
// tdrStyle->SetHeaderPS(const char* header);
// tdrStyle->SetTitlePS(const char* pstitle);
//tdrStyle->SetBarOffset(Float_t baroff = 0.5);
//tdrStyle->SetBarWidth(Float_t barwidth = 0.5);
//tdrStyle->SetPaintTextFormat(const char* format = "g");
tdrStyle->SetPalette(1);
//tdrStyle->SetTimeOffset(Double_t toffset);
//tdrStyle->SetHistMinimumZero(kTRUE);
const Int_t NRGBs = 5;
const Int_t NCont = 255;
Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 };
示例12: 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);
//.........这里部分代码省略.........
示例13: Style
void 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(1100); //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->SetHistLineWidth(1.5);
//For the fit/function:
tdrStyle->SetOptFit(1);
tdrStyle->SetStatColor(kWhite);
tdrStyle->SetStatFont(42);
tdrStyle->SetStatFontSize(0.025);
tdrStyle->SetOptStat(000000);
tdrStyle->SetStatColor(kWhite);
// Margins:
tdrStyle->SetPadTopMargin(0.05);
tdrStyle->SetPadBottomMargin(0.13);
tdrStyle->SetPadLeftMargin(0.10);
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.04, "XYZ");
tdrStyle->SetTitleXOffset(1.1);
tdrStyle->SetTitleYOffset(1.1);
// For the axis labels:
tdrStyle->SetLabelColor(1, "XYZ");
tdrStyle->SetLabelFont(42, "XYZ");
tdrStyle->SetLabelOffset(0.007, "XYZ");
tdrStyle->SetLabelSize(0.04, "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);
tdrStyle->SetOptLogz(0);
// Postscript options:
tdrStyle->SetPaperSize(20.,20.);
tdrStyle->cd();
gStyle->SetFillColor(-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 date:
tdrStyle->SetOptDate(0);
// tdrStyle->SetDateX(Float_t x = 0.01);
// tdrStyle->SetDateY(Float_t y = 0.01);
// For the statistics box:
tdrStyle->SetOptFile(11);
tdrStyle->SetOptStat(11111111);
// 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->SetTitleXSize(Float_t size = 0.02); // Another way to set the size?
// tdrStyle->SetTitleYSize(Float_t size = 0.02);
tdrStyle->SetTitleXOffset(0.7);
tdrStyle->SetTitleYOffset(0.7);
// tdrStyle->SetTitleOffset(1.1, "Y"); // Another way to set the Offset
// 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);
tdrStyle->cd();
}
示例15: getMyStyle
//.........这里部分代码省略.........
//For the fit/function:
myStyle->SetOptFit(1);
myStyle->SetFitFormat("5.4g");
myStyle->SetFuncColor(2);
myStyle->SetFuncStyle(1);
myStyle->SetFuncWidth(1);
//For the date:
myStyle->SetOptDate(1);
// myStyle->SetDateX(Float_t x = 0.01);
// myStyle->SetDateY(Float_t y = 0.01);
// For the statistics box:
myStyle->SetOptFile(0);
myStyle->SetOptStat("miourne"); // stats box
myStyle->SetOptFit(1111); // fit box
myStyle->SetStatColor(kWhite);
myStyle->SetStatFont(42);
myStyle->SetStatFontSize(0.025);
myStyle->SetStatTextColor(1);
myStyle->SetStatFormat("6.4g");
myStyle->SetStatBorderSize(1);
myStyle->SetStatH(0.1);
myStyle->SetStatW(0.15);
// myStyle->SetStatStyle(Style_t style = 1001);
// myStyle->SetStatX(Float_t x = 0);
// myStyle->SetStatY(Float_t y = 0);
// Margins:
myStyle->SetPadTopMargin(0.15);
myStyle->SetPadBottomMargin(0.13);
myStyle->SetPadLeftMargin(0.13);
myStyle->SetPadRightMargin(0.15);
// For the Global title:
// myStyle->SetOptTitle(0);
myStyle->SetTitleFont(42);
myStyle->SetTitleColor(1);
myStyle->SetTitleTextColor(1);
myStyle->SetTitleFillColor(10);
myStyle->SetTitleFontSize(0.05);
// myStyle->SetTitleH(0); // Set the height of the title box
// myStyle->SetTitleW(0); // Set the width of the title box
// myStyle->SetTitleX(0); // Set the position of the title box
// myStyle->SetTitleY(0.985); // Set the position of the title box
// myStyle->SetTitleStyle(Style_t style = 1001);
// myStyle->SetTitleBorderSize(2);
// For the axis titles:
myStyle->SetTitleColor(1, "XYZ");
myStyle->SetTitleFont(42, "XYZ");
myStyle->SetTitleSize(0.06, "XYZ");
// myStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size?
// myStyle->SetTitleYSize(Float_t size = 0.02);
myStyle->SetTitleXOffset(1.2);
myStyle->SetTitleYOffset(1.2);
myStyle->SetTitleOffset(1.2, "Y"); // Another way to set the Offset
// For the axis labels:
myStyle->SetLabelColor(1, "XYZ");
myStyle->SetLabelFont(42, "XYZ");
myStyle->SetLabelOffset(0.007, "XYZ");
myStyle->SetLabelSize(0.05, "XYZ");
// For the axis:
myStyle->SetAxisColor(1, "XYZ");
myStyle->SetStripDecimals(kTRUE);
myStyle->SetTickLength(0.03, "XYZ");
myStyle->SetNdivisions(510, "XYZ");
myStyle->SetPadTickX(0); // To get tick marks on the opposite side of the frame
myStyle->SetPadTickY(0);
// Change for log plots:
myStyle->SetOptLogx(0);
myStyle->SetOptLogy(0);
myStyle->SetOptLogz(0);
myStyle->SetPalette(1,0);
// Postscript options:
// myStyle->SetPaperSize(15.,15.);
// myStyle->SetLineScalePS(Float_t scale = 3);
// myStyle->SetLineStyleString(Int_t i, const char* text);
// myStyle->SetHeaderPS(const char* header);
// myStyle->SetTitlePS(const char* pstitle);
// myStyle->SetBarOffset(Float_t baroff = 0.5);
// myStyle->SetBarWidth(Float_t barwidth = 0.5);
// myStyle->SetPaintTextFormat(const char* format = "g");
// myStyle->SetPalette(Int_t ncolors = 0, Int_t* colors = 0);
// myStyle->SetTimeOffset(Double_t toffset);
// myStyle->SetHistMinimumZero(kTRUE);
myStyle->cd();
} //end of: void getMyStyle(void){