本文整理汇总了C++中TStyle::SetLabelOffset方法的典型用法代码示例。如果您正苦于以下问题:C++ TStyle::SetLabelOffset方法的具体用法?C++ TStyle::SetLabelOffset怎么用?C++ TStyle::SetLabelOffset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TStyle
的用法示例。
在下文中一共展示了TStyle::SetLabelOffset方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: hggPaperStyle
void hggPaperStyle()
{
// Hgg Paper style for plots
TStyle *hggStyle = new TStyle("hggStyle","Hgg Paper Style");
//hggStyle->SetCanvasColor(0);
//hggStyle->SetPadColor(0);
hggStyle->SetPadTickX(0);
hggStyle->SetPadTickY(0);
hggStyle->SetFrameFillColor(0);
hggStyle->SetStatColor(0);
hggStyle->SetOptStat(0);
hggStyle->SetTitleFillColor(0);
hggStyle->SetCanvasBorderMode(0);
hggStyle->SetPadBorderMode(0);
hggStyle->SetFrameBorderMode(0);
hggStyle->SetFrameBorderSize(1);
hggStyle->SetPadColor(kWhite);
hggStyle->SetCanvasColor(kWhite);
hggStyle->SetCanvasDefH(600); //Height of canvas
hggStyle->SetCanvasDefW(800); //Width of canvas
hggStyle->SetCanvasDefX(0); //POsition on screen
hggStyle->SetCanvasDefY(0);
hggStyle->SetPadLeftMargin(0.16);//0.16);
hggStyle->SetPadRightMargin(0.1);//0.02);
hggStyle->SetPadTopMargin(0.085);//0.02);
hggStyle->SetPadBottomMargin(0.12);//0.02);
// For hgg axis titles:
hggStyle->SetTitleColor(1, "XYZ");
hggStyle->SetTitleFont(42, "XYZ");
hggStyle->SetTitleSize(0.05, "XYZ");
hggStyle->SetTitleYOffset(1.5); // => 1.15 if exponents
hggStyle->SetTitleXOffset(1.);//0.9);
// For hgg axis labels:
hggStyle->SetLabelColor(1, "XYZ");
hggStyle->SetLabelFont(42, "XYZ");
hggStyle->SetLabelOffset(0.007, "XYZ");
hggStyle->SetLabelSize(0.045, "XYZ");
// Legends
hggStyle->SetLegendBorderSize(0);
hggStyle->SetLegendFillColor(kWhite);
hggStyle->SetLegendFont(42);
hggStyle->SetFillColor(10);
// Nothing for now
hggStyle->SetTextFont(42);
hggStyle->SetTextSize(0.03);
hggStyle->SetOptTitle(0);
hggStyle->SetOptStat(0);
hggStyle->cd();
}
示例2: setNiceStyle
void setNiceStyle()
{
gROOT->SetStyle("Plain");
// --------------------------------------------------
// define proper canvas style
// --------------------------------------------------
TStyle *MyStyle = new TStyle ("MyStyle", "My style for nicer plots");
Float_t xoff = MyStyle->GetLabelOffset("X"),
yoff = MyStyle->GetLabelOffset("Y"),
zoff = MyStyle->GetLabelOffset("Z");
MyStyle->SetCanvasBorderMode ( 0 );
MyStyle->SetPadBorderMode ( 0 );
MyStyle->SetPadColor ( 0 );
MyStyle->SetCanvasColor ( 0 );
MyStyle->SetTitleColor ( 0 );
MyStyle->SetStatColor ( 0 );
MyStyle->SetTitleBorderSize ( 0 );
MyStyle->SetTitleFillColor ( 0 );
MyStyle->SetTitleH ( 0.07 );
MyStyle->SetTitleW ( 1.00 );
MyStyle->SetTitleFont ( 132 );
MyStyle->SetLabelOffset (1.5*xoff, "X");
MyStyle->SetLabelOffset (1.5*yoff, "Y");
MyStyle->SetLabelOffset (1.5*zoff, "Z");
MyStyle->SetTitleOffset (0.9, "X");
MyStyle->SetTitleOffset (0.9, "Y");
MyStyle->SetTitleOffset (0.9, "Z");
MyStyle->SetTitleSize (0.045, "X");
MyStyle->SetTitleSize (0.045, "Y");
MyStyle->SetTitleSize (0.045, "Z");
MyStyle->SetLabelFont (132, "X");
MyStyle->SetLabelFont (132, "Y");
MyStyle->SetLabelFont (132, "Z");
MyStyle->SetPalette(1);
MyStyle->cd();
}
示例3: HPlusStyle
// TStyle used for HPlus Studies and AnalysisPack.
//********************************************************************//
void HPlusStyle(void) {
TStyle *HplusStyle = new TStyle("HplusStyle", "HplusStyle");
HplusStyle->SetCanvasBorderMode(0);
HplusStyle->SetCanvasColor(kWhite);
HplusStyle->SetPadBorderMode(0);
HplusStyle->SetPadColor(kWhite);
HplusStyle->SetTitleFillColor(kWhite);
HplusStyle->SetGridColor(0);
HplusStyle->SetFrameBorderMode(0);
HplusStyle->SetFrameBorderSize(1);
HplusStyle->SetFrameFillColor(0);
HplusStyle->SetFrameFillStyle(0);
HplusStyle->SetFrameLineColor(1);
HplusStyle->SetFrameLineStyle(1);
HplusStyle->SetFrameLineWidth(1);
// HplusStyle->SetFillColor(kWhite);
HplusStyle->SetOptTitle(0);
HplusStyle->SetTitleFont(42, "XYZ");
HplusStyle->SetTitleFontSize(0.05);
HplusStyle->SetTitleSize(0.06, "XYZ");
HplusStyle->SetTextFont(42);
HplusStyle->SetTitleXOffset(0.9);
HplusStyle->SetTitleYOffset(1.25);
HplusStyle->SetLabelColor(1, "XYZ");
HplusStyle->SetLabelFont(42, "XYZ");
HplusStyle->SetLabelOffset(0.007, "XYZ");
HplusStyle->SetLabelSize(0.05, "XYZ");
HplusStyle->SetPadTickX(1); // To get tick marks on the opposite side of the frame
HplusStyle->SetPadTickY(1); // To get tick marks on the opposite side of the frame
HplusStyle->SetNdivisions(508,"XYZ");
HplusStyle->SetPadTopMargin(0.05);
HplusStyle->SetPadBottomMargin(0.12);
HplusStyle->SetPadLeftMargin(0.16);
HplusStyle->SetPadRightMargin(0.04);//0.02
HplusStyle->SetCanvasDefH(1280); //Height of canvas
HplusStyle->SetCanvasDefW(1024); //Width of canvas
HplusStyle->SetCanvasDefX(0); //POsition on screen
HplusStyle->SetCanvasDefY(0);
HplusStyle->SetPaintTextFormat("5.2f");
// HplusStyle->SetPalette(1, 0); // Pretty palette
HplusStyle->SetOptStat(0);
/// Statistics Box
HplusStyle->SetStatX(0.9);
HplusStyle->SetStatY(0.9);
// HplusStyle->SetStatW(0.19) // default
// HplusStyle->SetStatH(0.1) // default
HplusStyle->SetStatW(0.15);
HplusStyle->SetStatH(0.1);
HplusStyle->cd();
} //eof: void HPlusStyle(void){
示例4: setNiceStyle
//------------------------------------------------------------------------------
void PlotAlignmentValidation::setNiceStyle() {
TStyle *MyStyle = new TStyle ("MyStyle", "My style for nicer plots");
Float_t xoff = MyStyle->GetLabelOffset("X"),
yoff = MyStyle->GetLabelOffset("Y"),
zoff = MyStyle->GetLabelOffset("Z");
MyStyle->SetCanvasBorderMode ( 0 );
MyStyle->SetPadBorderMode ( 0 );
MyStyle->SetPadColor ( 0 );
MyStyle->SetCanvasColor ( 0 );
MyStyle->SetTitleColor ( 0 );
MyStyle->SetStatColor ( 0 );
MyStyle->SetTitleBorderSize ( 0 );
MyStyle->SetTitleFillColor ( 0 );
MyStyle->SetTitleH ( 0.07 );
MyStyle->SetTitleW ( 1.00 );
MyStyle->SetTitleFont ( 132 );
MyStyle->SetLabelOffset (1.5*xoff, "X");
MyStyle->SetLabelOffset (1.5*yoff, "Y");
MyStyle->SetLabelOffset (1.5*zoff, "Z");
MyStyle->SetTitleOffset (1.5, "X");
MyStyle->SetTitleOffset (1.2, "Y");
MyStyle->SetTitleOffset (0.9, "Z");
MyStyle->SetTitleSize (0.045, "X");
MyStyle->SetTitleSize (0.045, "Y");
MyStyle->SetTitleSize (0.045, "Z");
MyStyle->SetLabelFont (132, "X");
MyStyle->SetLabelFont (132, "Y");
MyStyle->SetLabelFont (132, "Z");
MyStyle->SetPalette(1);
MyStyle->cd();
}
示例5: LAWStyle
// Lauri's Style (LAuri Wendland)
//********************************************************************//
void LAWStyle() {
TStyle *LAWStyle = new TStyle("LAWStyle", "Neat style");
LAWStyle->SetCanvasBorderMode(0);
LAWStyle->SetCanvasColor(kWhite);
LAWStyle->SetPadBorderMode(0);
LAWStyle->SetPadColor(kWhite);
LAWStyle->SetTitleFillColor(kWhite);
LAWStyle->SetGridColor(0);
LAWStyle->SetFrameBorderMode(0);
LAWStyle->SetFrameBorderSize(1);
LAWStyle->SetFrameFillColor(0);
LAWStyle->SetFrameFillStyle(0);
LAWStyle->SetFrameLineColor(1);
LAWStyle->SetFrameLineStyle(1);
LAWStyle->SetFrameLineWidth(1);
LAWStyle->SetFillColor(kWhite);
LAWStyle->SetFillColor(kWhite);
LAWStyle->SetOptTitle(0);
LAWStyle->SetTitleFont(42, "XYZ");
LAWStyle->SetTitleFontSize(0.05);
LAWStyle->SetTitleSize(0.06, "XYZ");
LAWStyle->SetTextFont(42);
LAWStyle->SetTitleXOffset(0.9);
LAWStyle->SetTitleYOffset(1.25);
LAWStyle->SetLabelColor(1, "XYZ");
LAWStyle->SetLabelFont(42, "XYZ");
LAWStyle->SetLabelOffset(0.007, "XYZ");
LAWStyle->SetLabelSize(0.05, "XYZ");
LAWStyle->SetPadTickX(1); // To get tick marks on the opposite side of the frame
LAWStyle->SetPadTickY(1); // To get tick marks on the opposite side of the frame
LAWStyle->SetNdivisions(508,"XYZ");
LAWStyle->SetPadTopMargin(0.05);
LAWStyle->SetPadBottomMargin(0.12);
LAWStyle->SetPadLeftMargin(0.16);
LAWStyle->SetPadRightMargin(0.04);//0.02
LAWStyle->SetCanvasDefH(600); //Height of canvas
LAWStyle->SetCanvasDefW(600); //Width of canvas
LAWStyle->SetCanvasDefX(0); //POsition on screen
LAWStyle->SetCanvasDefY(0);
LAWStyle->SetOptTitle(0);
LAWStyle->SetOptStat(0);
LAWStyle->cd();
} //end of: void LAWStyle(){
示例6: setDefaultStyle
void setDefaultStyle()
{
TStyle *defaultStyle = new TStyle("defaultStyle","Default Style");
defaultStyle->SetOptStat(0000);
defaultStyle->SetOptFit(000);
defaultStyle->SetPalette(1);
/////// pad ////////////
defaultStyle->SetPadBorderMode(1);
defaultStyle->SetPadBorderSize(1);
defaultStyle->SetPadColor(0);
defaultStyle->SetPadTopMargin(0.05);
defaultStyle->SetPadBottomMargin(0.13);
defaultStyle->SetPadLeftMargin(0.14);
defaultStyle->SetPadRightMargin(0.02);
/////// canvas /////////
defaultStyle->SetCanvasBorderMode(0);
defaultStyle->SetCanvasColor(0);
defaultStyle->SetCanvasDefH(600);
defaultStyle->SetCanvasDefW(600);
/////// frame //////////
defaultStyle->SetFrameBorderMode(0);
defaultStyle->SetFrameBorderSize(1);
defaultStyle->SetFrameFillColor(0);
defaultStyle->SetFrameLineColor(1);
/////// label //////////
defaultStyle->SetLabelOffset(0.005,"XY");
defaultStyle->SetLabelSize(0.05,"XY");
defaultStyle->SetLabelFont(42,"XY");
/////// title //////////
defaultStyle->SetTitleOffset(1.2,"X");
defaultStyle->SetTitleSize(0.05,"X");
defaultStyle->SetTitleOffset(1.4,"Y");
defaultStyle->SetTitleSize(0.05,"Y");
defaultStyle->SetTitleFont(42, "XYZ");
/////// various ////////
defaultStyle->SetLegendBorderSize(0);
defaultStyle->cd();
}
示例7: setStyle
void setStyle() {
TStyle *setStyle = new TStyle("setStyle","Style for GCT Analyzer");
// Stuff from plain style
setStyle->SetCanvasColor(kWhite);
setStyle->SetFrameBorderMode(0);
setStyle->SetCanvasBorderMode(0);
setStyle->SetFrameFillColor(0);
setStyle->SetPadBorderMode(0);
setStyle->SetPadColor(kWhite);
setStyle->SetOptStat(0);
setStyle->SetOptTitle(0);
setStyle->SetOptFit(0);
setStyle->SetOptDate(0);
// Labels and borders
setStyle->SetLabelSize(0.055,"x");
setStyle->SetLabelSize(0.06,"y");
setStyle->SetLabelOffset(0.00,"x");
setStyle->SetLabelOffset(0.00,"y");
setStyle->SetTitleOffset(0.05,"x");
setStyle->SetTitleOffset(0.50,"y");
//setStyle->SetLabelFont(22,"x");
//setStyle->SetLabelFont(22,"y");
//setStyle->SetErrorX(0.0000);
//setStyle->SetTickLength(0.05,"x");
//setStyle->SetTickLength(0.05,"y");
//setStyle->SetLineWidth(0.8);
//setStyle->SetPadTickX(1);
//setStyle->SetPadTickY(1);
setStyle->SetPadLeftMargin(0.15);
setStyle->SetPadTopMargin(0.077);
setStyle->SetPadBottomMargin(0.123);
setStyle->cd();
}
示例8: blinding_study
void blinding_study()
{
gSystem->CompileMacro("MitGPTree.h");
// First we define MIT Style for the plots.
TStyle *MitStyle = gStyle;
//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.04);
MitStyle->SetPadLeftMargin (0.18);
MitStyle->SetPadRightMargin (0.04);
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->SetTickLength (-0.03,"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->SetTickLength (-0.03,"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);
// Here the style section ends and the macro begins.
string sig_samples[] =
{
"s12-dmmpho-v_m1-v7a",
"s12-dmmpho-av_m1-v7a",
"s12-dmmpho-v_m10-v7a",
"s12-dmmpho-av_m10-v7a",
"s12-dmmpho-v_m100-v7a",
"s12-dmmpho-av_m100-v7a",
"s12-dmmpho-v_m200-v7a",
"s12-dmmpho-av_m200-v7a",
"s12-dmmpho-av_m300-v7a",
"s12-dmmpho-v_m500-v7a",
"s12-dmmpho-av_m500-v7a",
"s12-dmmpho-v_m1000-v7a",
//.........这里部分代码省略.........
示例9: SetStyle
void SetStyle() {
TH1::SetDefaultSumw2();
gROOT->SetStyle("Plain");
TStyle *MITStyle = new TStyle("MIT-Style","The Perfect Style for Plots ;-)");
gStyle = MITStyle;
gStyle->SetTitleSize(0.08,"t");// gStyle->SetTitleX(0.8);
gStyle->SetTitleW(0.3);
gStyle->SetFrameFillColor(2);
gStyle->SetFrameLineColor(2);
// Canvas
MITStyle->SetCanvasColor (0);
MITStyle->SetCanvasBorderSize(10);
MITStyle->SetCanvasBorderMode(0);
MITStyle->SetCanvasDefH (500);
MITStyle->SetCanvasDefW (550);
// MITStyle->SetCanvasDefX (100);
// MITStyle->SetCanvasDefY (100);
// Pads
MITStyle->SetPadColor (0);
// MITStyle->SetPadBorderSize (10);
MITStyle->SetPadBorderMode (0);
MITStyle->SetPadBottomMargin(0.18);
MITStyle->SetPadTopMargin (0.06);
MITStyle->SetPadLeftMargin (0.22);
MITStyle->SetPadRightMargin (0.06);
MITStyle->SetPadGridX (0);
MITStyle->SetPadGridY (0);
MITStyle->SetPadTickX (1);
MITStyle->SetPadTickY (1);
// Frames
MITStyle->SetFrameFillStyle ( 0);
MITStyle->SetFrameFillColor ( 0);
MITStyle->SetFrameLineColor ( 1);
MITStyle->SetFrameLineStyle ( 0);
MITStyle->SetFrameLineWidth ( 1);
// MITStyle->SetFrameBorderSize(10);
MITStyle->SetFrameBorderMode( 0);
// Histograms
MITStyle->SetHistLineColor(1);
MITStyle->SetHistLineStyle(0);
MITStyle->SetHistLineWidth(3);
MITStyle->SetNdivisions(505,"X");
MITStyle->SetNdivisions(505,"Y");
MITStyle->SetNdivisions(505,"Z");
// Functions
MITStyle->SetFuncColor(1);
MITStyle->SetFuncStyle(0);
MITStyle->SetFuncWidth(2);
// Various
MITStyle->SetMarkerStyle(20);
MITStyle->SetMarkerColor(kBlack);
MITStyle->SetMarkerSize (1.2);
// MITStyle->SetTitleSize (0.1,"t");
MITStyle->SetTitleSize (0.070,"X");
MITStyle->SetTitleOffset(1.0,"X");
MITStyle->SetTitleFont (42,"X");
MITStyle->SetLabelOffset(0.005,"X");
MITStyle->SetLabelSize (0.070,"X");
MITStyle->SetLabelFont (42 ,"X");
MITStyle->SetTitleSize (0.070,"Y");
MITStyle->SetTitleOffset(1.0,"Y");
MITStyle->SetTitleFont (42,"Y");
MITStyle->SetLabelOffset(0.005,"Y");
MITStyle->SetLabelSize (0.070,"Y");
MITStyle->SetLabelFont (42 ,"Y");
MITStyle->SetTitleSize (0.06,"Z");
MITStyle->SetTitleOffset(1.640,"Z");
MITStyle->SetTitleFont (42,"Z");
MITStyle->SetLabelOffset(0.005,"Z");
MITStyle->SetLabelSize (0.070,"Z");
MITStyle->SetLabelFont (42 ,"Z");
MITStyle->SetStripDecimals(kFALSE);
MITStyle->SetTitleBorderSize(0);
MITStyle->SetTitleFillColor(0);
// MITStyle->SetTitleAlign(6);
MITStyle->SetTextSize (20);
MITStyle->SetTextFont (43);
//.........这里部分代码省略.........
示例10: SetStyle
void SetStyle()
{
TStyle *MYStyle = new TStyle("Style","Style");
gStyle = MYStyle;
// Canvas
MYStyle->SetCanvasColor (0);
MYStyle->SetCanvasBorderSize(10);
MYStyle->SetCanvasBorderMode(0);
MYStyle->SetCanvasDefH (700);
MYStyle->SetCanvasDefW (700);
MYStyle->SetCanvasDefX (100);
MYStyle->SetCanvasDefY (100);
// Pads
MYStyle->SetPadColor (0);
MYStyle->SetPadBorderSize (10);
MYStyle->SetPadBorderMode (0);
MYStyle->SetPadBottomMargin(0.13);
MYStyle->SetPadTopMargin (0.08);
MYStyle->SetPadLeftMargin (0.15);
MYStyle->SetPadRightMargin (0.05);
MYStyle->SetPadGridX (0);
MYStyle->SetPadGridY (0);
MYStyle->SetPadTickX (0);
MYStyle->SetPadTickY (0);
// Frames
MYStyle->SetFrameFillStyle ( 0);
MYStyle->SetFrameFillColor ( 0);
MYStyle->SetFrameLineColor ( 1);
MYStyle->SetFrameLineStyle ( 0);
MYStyle->SetFrameLineWidth ( 1);
MYStyle->SetFrameBorderSize(10);
MYStyle->SetFrameBorderMode( 0);
// Histograms
MYStyle->SetHistFillColor(2);
// MYStyle->SetHistFillStyle(0);
MYStyle->SetHistLineColor(1);
MYStyle->SetHistLineStyle(0);
MYStyle->SetHistLineWidth(2);
MYStyle->SetNdivisions(505);
// Functions
MYStyle->SetFuncColor(1);
MYStyle->SetFuncStyle(0);
MYStyle->SetFuncWidth(2);
// Various
MYStyle->SetMarkerStyle(20);
MYStyle->SetMarkerColor(kBlack);
MYStyle->SetMarkerSize (1.2);
MYStyle->SetTitleSize (0.055,"X");
MYStyle->SetTitleOffset(1.050,"X");
MYStyle->SetLabelOffset(0.005,"X");
MYStyle->SetLabelSize (0.045,"X");
MYStyle->SetLabelFont (42 ,"X");
MYStyle->SetStripDecimals(kFALSE);
MYStyle->SetTitleSize (0.055,"Y");
MYStyle->SetTitleOffset(1.400,"Y");
MYStyle->SetLabelOffset(0.010,"Y");
MYStyle->SetLabelSize (0.045,"Y");
MYStyle->SetLabelFont (42 ,"Y");
MYStyle->SetTextSize (0.055);
MYStyle->SetTextFont (42);
MYStyle->SetStatFont (42);
MYStyle->SetTitleFont (42);
MYStyle->SetTitleFont (42,"X");
MYStyle->SetTitleFont (42,"Y");
MYStyle->SetOptStat (0);
MYStyle->SetPalette (1);
return;
}
示例11: 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);
//.........这里部分代码省略.........
示例12: 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);
}
示例13: electronCompare
int electronCompare()
{
TString CMP_DIR = gSystem->Getenv( "CMP_DIR" ) ;
TString CMP_URL = gSystem->Getenv( "CMP_URL" ) ;
TString CMP_TITLE = gSystem->Getenv( "CMP_TITLE" ) ;
TString CMP_RED_FILE = gSystem->Getenv( "CMP_RED_FILE" ) ;
TString CMP_BLUE_FILE = gSystem->Getenv( "CMP_BLUE_FILE" ) ;
TString CMP_RED_NAME = gSystem->Getenv( "CMP_RED_NAME" ) ;
TString CMP_BLUE_NAME = gSystem->Getenv( "CMP_BLUE_NAME" ) ;
TString CMP_RED_COMMENT = gSystem->Getenv( "CMP_RED_COMMENT" ) ;
TString CMP_BLUE_COMMENT = gSystem->Getenv( "CMP_BLUE_COMMENT" ) ;
TString CMP_CONFIG = gSystem->Getenv( "CMP_CONFIG" ) ;
TString CMP_RED_RELEASE = gSystem->Getenv( "CMP_RED_RELEASE" ) ;
TString CMP_BLUE_RELEASE = gSystem->Getenv( "CMP_BLUE_RELEASE" ) ;
//-----
// AC
// std::cout << "red_file : C : " << CMP_RED_FILE << std::endl;
// std::cout << "blue_file : C : " << CMP_BLUE_FILE << std::endl;
std::cout << "red_release : C : " << CMP_RED_RELEASE << std::endl;
std::cout << "blue_release : C : " << CMP_BLUE_RELEASE << std::endl;
//-----
// style:
TStyle *eleStyle = new TStyle("eleStyle","Style for electron validation");
eleStyle->SetCanvasBorderMode(0);
eleStyle->SetCanvasColor(kWhite);
eleStyle->SetCanvasDefH(600);
eleStyle->SetCanvasDefW(800);
eleStyle->SetCanvasDefX(0);
eleStyle->SetCanvasDefY(0);
eleStyle->SetPadBorderMode(0);
eleStyle->SetPadColor(kWhite);
eleStyle->SetPadGridX(false);
eleStyle->SetPadGridY(false);
eleStyle->SetGridColor(0);
eleStyle->SetGridStyle(3);
eleStyle->SetGridWidth(1);
eleStyle->SetOptStat(1);
eleStyle->SetPadTickX(1);
eleStyle->SetPadTickY(1);
eleStyle->SetHistLineColor(1);
eleStyle->SetHistLineStyle(0);
eleStyle->SetHistLineWidth(2);
eleStyle->SetEndErrorSize(2);
eleStyle->SetErrorX(0.);
eleStyle->SetOptStat(1);
eleStyle->SetTitleColor(1, "XYZ");
eleStyle->SetTitleFont(42, "XYZ");
eleStyle->SetTitleXOffset(1.0);
eleStyle->SetTitleYOffset(1.0);
eleStyle->SetLabelOffset(0.005, "XYZ");
eleStyle->SetTitleSize(0.05, "XYZ");
eleStyle->SetTitleFont(22,"X");
eleStyle->SetTitleFont(22,"Y");
eleStyle->SetHistLineWidth(2);
eleStyle->SetPadBottomMargin(0.13);
eleStyle->SetPadLeftMargin(0.15);
eleStyle->SetMarkerStyle(21);
eleStyle->SetMarkerSize(0.8);
//-- AC --
eleStyle->SetPadRightMargin(0.2) ;
eleStyle->cd();
gROOT->ForceStyle();
TString internal_path("DQMData/Run 1/EgammaV/Run summary/") ;
TString old_internal_path("DQMData/EgammaV/") ;
TString file_ref_dir ;
TFile * file_ref = 0 ;
if ( CMP_BLUE_FILE != "" )
{
file_ref = TFile::Open(CMP_BLUE_FILE) ;
if (file_ref!=0)
{
std::cout<<"open "<<CMP_BLUE_FILE<<std::endl ;
if (file_ref->cd(internal_path)==kTRUE)
{
std::cerr<<"cd "<<internal_path<<std::endl ;
file_ref_dir = internal_path ;
file_ref->cd() ;
}
else if (file_ref->cd(old_internal_path)==kTRUE)
{
std::cerr<<"cd "<<old_internal_path<<std::endl ;
file_ref_dir = old_internal_path ;
file_ref->cd() ;
}
else
{
std::cerr<<"Failed move to: "<<internal_path<<" and "<<old_internal_path<<std::endl ;
file_ref_dir = "" ;
}
}
else
{ std::cerr<<"Failed to open: "<<CMP_BLUE_FILE<<std::endl ; }
}
//.........这里部分代码省略.........
示例14: LatinoStyle2
void LatinoStyle2()
{
TStyle* GloStyle;
GloStyle = gStyle;
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->SetOptStat ( 0);
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;
//.........这里部分代码省略.........
示例15: 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();
}