本文整理汇总了C++中TStyle::SetHatchesSpacing方法的典型用法代码示例。如果您正苦于以下问题:C++ TStyle::SetHatchesSpacing方法的具体用法?C++ TStyle::SetHatchesSpacing怎么用?C++ TStyle::SetHatchesSpacing使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TStyle
的用法示例。
在下文中一共展示了TStyle::SetHatchesSpacing方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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();
}
示例2: 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);
//.........这里部分代码省略.........
示例3: setTDRStyle
//.........这里部分代码省略.........
//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.02);
// 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);
tdrStyle->SetTitleXOffset(0.9);
tdrStyle->SetTitleYOffset(1.25);
// 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.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->SetHatchesLineWidth(5);
tdrStyle->SetHatchesSpacing(0.05);
tdrStyle->cd();
}
示例4: 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);
//.........这里部分代码省略.........