本文整理汇总了C++中TPad::SetTicks方法的典型用法代码示例。如果您正苦于以下问题:C++ TPad::SetTicks方法的具体用法?C++ TPad::SetTicks怎么用?C++ TPad::SetTicks使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TPad
的用法示例。
在下文中一共展示了TPad::SetTicks方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrawGraph
void DrawGraph(string name, TGraphErrors* graph)
{
TCanvas* canvas = new TCanvas(name.c_str(),"",1200,900);
canvas->SetFillColor(kWhite);
canvas->cd();
TPad* pad = new TPad();
// left right bottom top
pad->SetMargin(0.15,0.05,0.15,0.05);
pad->SetTicks(1,1);
pad->SetFillColor(kWhite);
pad->Draw();
pad->cd();
TGraphErrors* oldgraph = graph;
graph = new TGraphErrors(*graph);
delete oldgraph;
float textsize = 0.055;
graph->SetMinimum(0);
graph->SetMaximum(100);
graph->SetTitle("");
graph->GetXaxis()->SetTitle("#it{m}(#it{K^{#plus}K^{#minus}}) [MeV/#it{c}^{2}]");
graph->GetYaxis()->SetTitle("Efficiency [%]");
graph->SetLineColor(kBlack);
graph->SetLineWidth(1);
graph->SetMarkerSize(1);
graph->SetMarkerStyle(8);
graph->SetMarkerColor(kBlack);
graph->Draw("AP");
graph->GetXaxis()->SetTitleSize(textsize*1.2);
graph->GetYaxis()->SetTitleSize(textsize*1.2);
graph->GetXaxis()->SetLabelSize(textsize);
graph->GetYaxis()->SetLabelSize(textsize);
graph->GetXaxis()->SetTitleFont(132);
graph->GetYaxis()->SetTitleFont(132);
graph->GetXaxis()->SetLabelFont(132);
graph->GetYaxis()->SetLabelFont(132);
graph->GetYaxis()->CenterTitle();
double _blurbx = 0.75;
double _blurby = 0.80;
string _blurbtext = "#splitline{LHCb}{#scale[0.75]{Preliminary}}";
TLatex* _blurb = new TLatex(_blurbx,_blurby,_blurbtext.c_str());
_blurb->SetTextFont(132);
_blurb->SetTextColor(1);
_blurb->SetNDC(kTRUE);
_blurb->SetTextAlign(11);
_blurb->SetTextSize(0.07);
_blurb->Draw();
canvas->SaveAs((name+".pdf").c_str());
canvas->Write();
}