本文整理汇总了C++中TAxis::SetDecimals方法的典型用法代码示例。如果您正苦于以下问题:C++ TAxis::SetDecimals方法的具体用法?C++ TAxis::SetDecimals怎么用?C++ TAxis::SetDecimals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TAxis
的用法示例。
在下文中一共展示了TAxis::SetDecimals方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: plot3
//.........这里部分代码省略.........
fitsph = yArray[tphStep]*yArray[tphStep];
fitcph = 1.0 - fitsph;
if( (sphmin < fitsph) && (fitsph<sphmax) ) {
MMII(C1,C2,fitx,fitsph,fitcph,MZ,MW);
if(MZ < Mmin) { Mmin = MZ; cout << MZ << "\t" << sqrt(fitsph) << endl;}
}
}
}
}
// CREATE PLOTS /////////////////////////////////////////////////////////
NPplot->SetLineStyle(2);
NPplot->SetMarkerStyle(20);
NPplot->SetMarkerSize(0.4);
SMplot->SetMarkerStyle(20);
SMplot->SetMarkerSize(0.4);
if(strpltmd.compare("cos") == 0) {yMin = 0.0; yMax = 1.0;}
if(strpltmd.compare("sin") == 0) {yMin = 0.0; yMax = 1.0;}
if(strpltmd.compare("mmp") == 0) {xMin = 0.0; xMax = 5.0; yMin = 0.0; yMax = 5;}
TH1F* frame = MyC->DrawFrame(0.9*xMin,0.9*yMin,1.1*xMax,1.0*yMax);
frame->SetTitle(plottitle.c_str());
TAxis *xaxis = frame->GetXaxis();
TAxis *yaxis = frame->GetYaxis();
xaxis->SetTitle(xtitle.c_str());
xaxis->CenterTitle();
xaxis->SetTitleOffset(1.);
xaxis->SetDecimals();
xaxis->SetLabelSize(0.03);
xaxis->SetLabelOffset(0.01);
yaxis->SetTitle(ytitle.c_str());
yaxis->CenterTitle();
yaxis->SetTitleOffset(1.2);
yaxis->SetDecimals();
yaxis->SetLabelSize(0.03);
yaxis->SetLabelOffset(0.01);
TLegend *mmleg = new TLegend(mmlegxmin,mmlegymin,mmlegxmax,mmlegymax);
mmleg->AddEntry(NPplot,NPleg.c_str(),"l");
mmleg->AddEntry(SMplot,SMleg.c_str(),"l");
mmleg->SetTextSize(0.025);
mmleg->SetFillStyle(0);
if( (strfile.compare("uu-d") != 0) && (strfile.compare("nu-d") != 0) ) {
for(tphStep=0; tphStep<tphSteps; tphStep++){NPmrk[tphStep]->Draw(); SMmrk[tphStep]->Draw();}
}
Float_t xdummy[1] = {0.0}, ydummy[1] = {0.0};
TGraph *circle = new TGraph(1,xdummy,ydummy);
circle->SetMarkerStyle(24);
circle->SetMarkerColor(kGreen+1);
circle->SetMarkerSize(0.8);
TGraph *square = new TGraph(1,xdummy,ydummy);
square->SetMarkerStyle(25);
square->SetMarkerColor(kCyan+1);
square->SetMarkerSize(0.8);
示例2: plotFit
//.........这里部分代码省略.........
if (fittph > tphMax) tphMax = fittph;
fitxArray[tphStep] = fitx;
if (fitx < fitxMin) fitxMin = fitx;
if (fitx > fitxMax) fitxMax = fitx;
tphStep++;
TMarker *m = new TMarker(fitxArray[tphStep],tphArray[tphStep],20);
m->SetMarkerSize(2);
m->SetMarkerColor(31+tphStep);
m->Draw();
}
}
if (s2bStep == 0) {
TH1F* frame = MyC->DrawFrame(0.0,0.0,1.1*fitxMax,1.1);
// TH1F* frame = MyC->DrawFrame(0.7*fitxMin,0.7*tphMin,1.1*fitxMax,1.1*tphMax);
TAxis *xaxis = frame->GetXaxis();
TAxis *yaxis = frame->GetYaxis();
xaxis->SetTitle("x = u^{2}/v^{2}");
xaxis->CenterTitle();
xaxis->SetTitleOffset(1.);
xaxis->SetDecimals();
xaxis->SetLabelSize(0.03);
xaxis->SetLabelOffset(0.01);
yaxis->SetTitle("tan^{2}(#phi)");
yaxis->CenterTitle();
yaxis->SetTitleOffset(1.);
yaxis->SetDecimals();
yaxis->SetLabelSize(0.03);
yaxis->SetLabelOffset(0.01);
frame->SetTitle(plottitle.c_str());
}
tphplots[s2bStep] = new TGraph(tphSteps,fitxArray,tphArray);
tphplots[s2bStep]->SetMarkerStyle(20);
tphplots[s2bStep]->SetMarkerSize(0.4);
tphplots[s2bStep]->Draw("CP");
}
}
else if (strpltmd.compare("s2b") == 0) {
s2bMax = -1.0;
TGraph *s2bplots[tphSteps-100];
for(tphStep=0; tphStep<tphSteps-100; tphStep++) {