本文整理汇总了C++中TVirtualPad::GetRightMargin方法的典型用法代码示例。如果您正苦于以下问题:C++ TVirtualPad::GetRightMargin方法的具体用法?C++ TVirtualPad::GetRightMargin怎么用?C++ TVirtualPad::GetRightMargin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TVirtualPad
的用法示例。
在下文中一共展示了TVirtualPad::GetRightMargin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TCanvas
/**
* Draw final plot for QM2011
*
* @param max
*
* @ingroup pwglf_forward_scripts
*/
void
dndeta_final(Double_t max=6)
{
gStyle->SetOptTitle(0);
gStyle->SetOptFit(0);
gStyle->SetTitleFont(132, "xyz");
gStyle->SetTitleSize(0.1, "xyz");
gStyle->SetTitleOffset(0.4, "y");
gStyle->SetTitleOffset(0.8, "x");
gStyle->SetLabelFont(132, "xyz");
gStyle->SetLabelSize(0.08, "xyz");
gStyle->SetNdivisions(212, "x");
gStyle->SetNdivisions(208, "y");
gStyle->SetTextFont(132);
gStyle->SetPadColor(0);
gStyle->SetPadBorderMode(0);
// gStyle->SetFillColor(0);
// gStyle->SetFillStyle(0);
TCanvas* c = new TCanvas("c", "c", 900, 900);
c->SetFillColor(0);
c->SetFillStyle(0);
c->SetBorderSize(0);
c->SetBorderMode(0);
c->SetRightMargin(0.02);
c->SetTopMargin(0.02);
c->SetBottomMargin(0.15);
c->Divide(1,3,0,0);
// --- INEL --------------------------------------------------------
TVirtualPad* p = c->cd(1);
p->SetGridx();
p->SetRightMargin(.01);
THStack* inel = new THStack("inel", "INEL");
TLatex* inelT = new TLatex(1-p->GetRightMargin()-.01,
1-p->GetTopMargin()-.01,
"INEL");
inelT->SetNDC();
inelT->SetTextAlign(33);
inelT->SetTextSize(0.12);
TLegend* inelL = new TLegend(.3, .02, .8, .4);
inelL->SetBorderSize(0);
inelL->SetNColumns(2);
inelL->SetFillColor(0);
inelL->SetFillStyle(0);
TLegendEntry* e = inelL->AddEntry("d1", "Forward", "lp");
e->SetMarkerColor(kRed+2);
e->SetMarkerStyle(29);
e = inelL->AddEntry("d2", "Central", "lp");
e->SetMarkerColor(kMagenta+2);
e->SetMarkerStyle(29);
e = inelL->AddEntry("d3", "Data", "lp");
e->SetMarkerStyle(29);
e = inelL->AddEntry("d4", "Mirrored data", "lp");
e->SetMarkerStyle(30);
e = inelL->AddEntry("d5", "Systematic error", "f");
e->SetFillColor(kGray);
e->SetLineColor(kGray);
e->SetLineWidth(0);
e->SetFillStyle(3001);
gROOT->LoadMacro("export_pp_0900GeV_INEL_m10p10cm_000100000ev.C");
export_pp_0900GeV_INEL_m10p10cm_000100000ev(inel, inelL, 20);
export_pp_0900GeV_INEL_m10p10cm_000100000ev(inel, inelL, 21);
export_pp_0900GeV_INEL_m10p10cm_000100000ev(inel, inelL, 22);
inel->Draw("nostack e1");
inel->GetHistogram()->SetYTitle("#frac{1}{N}#frac{dN_{ch}}{d#eta}");
inel->GetHistogram()->SetXTitle("#eta");
inel->GetHistogram()->GetYaxis()->SetDecimals();
inelL->Draw();
inelT->Draw();
// --- INEL>0 ------------------------------------------------------
p = c->cd(2);
p->SetGridx();
p->SetRightMargin(.01);
THStack* inelgt0 = new THStack("inelgt0", "INEL>0");
TLatex* inelgt0T = new TLatex(1-p->GetRightMargin()-.01,
1-p->GetTopMargin()-.01,
"INEL>0");
inelgt0T->SetNDC();
inelgt0T->SetTextAlign(33);
inelgt0T->SetTextSize(0.12);
gROOT->LoadMacro("export_pp_0900GeV_INEL_m10p10cm_000100000ev.C");
export_pp_0900GeV_INEL_m10p10cm_000100000ev(inelgt0, 0, 20);
export_pp_0900GeV_INEL_m10p10cm_000100000ev(inelgt0, 0, 21);
export_pp_0900GeV_INEL_m10p10cm_000100000ev(inelgt0, 0, 22);
inelgt0->Draw("nostack e1");
inelgt0->GetHistogram()->SetXTitle("#eta");
inelgt0->GetHistogram()->GetYaxis()->SetDecimals();
inelgt0T->Draw();
// --- NSD ---------------------------------------------------------
//.........这里部分代码省略.........