本文整理汇总了C++中TGraph::SetFillColorAlpha方法的典型用法代码示例。如果您正苦于以下问题:C++ TGraph::SetFillColorAlpha方法的具体用法?C++ TGraph::SetFillColorAlpha怎么用?C++ TGraph::SetFillColorAlpha使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TGraph
的用法示例。
在下文中一共展示了TGraph::SetFillColorAlpha方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
}
// add origin
gNew->SetPoint(0, hCL->GetXaxis()->GetXmin(), 0);
// add a point at first y height but at x=origin.
g->GetPoint(0, pointx0, pointy0);
gNew->SetPoint(1, hCL->GetXaxis()->GetXmin(), pointy0);
// add a point at last y height but at x=xmax.
g->GetPoint(g->GetN()-1, pointx0, pointy0);
gNew->SetPoint(gNew->GetN()-2, hCL->GetXaxis()->GetXmax(), pointy0);
// add a point at xmax, 0
gNew->SetPoint(gNew->GetN()-1, hCL->GetXaxis()->GetXmax(), 0);
g = gNew;
}
int color = s->getLineColor();
if(CLsType>0 && s->getMethodName().Contains("Plugin") && !arg->plotpluginonly) {
if (CLsType==1) color = kBlue-7;
else if (CLsType==2) color = kBlue+2;
}
else if(CLsType>0) {
if (CLsType==1) color = s->getLineColor() - 5;
if (CLsType==2) color = s->getLineColor() - 4;
}
g->SetLineColor(color);
if ( filled ){
g->SetLineWidth(2);
double alpha = arg->isQuickhack(12) ? 0.4 : 1.;
if ( arg->isQuickhack(24) ) alpha = 0.;
g->SetFillColorAlpha(color,alpha);
g->SetLineStyle(1);
g->SetFillStyle( s->getFillStyle() );
}
else{
g->SetLineWidth(2);
g->SetLineStyle(s->getLineStyle());
if ( last && arg->isQuickhack(25) ) g->SetLineWidth(3);
}
if ( plotPoints ){
g->SetLineWidth(1);
g->SetMarkerColor(color);
g->SetMarkerStyle(8);
g->SetMarkerSize(0.6);
if(CLsType==1) {
g->SetMarkerStyle(33);
g->SetMarkerSize(1);
}
if(CLsType==2) {
g->SetMarkerStyle(21);
}
}
// build a histogram which holds the axes
float min = arg->scanrangeMin == arg->scanrangeMax ? hCL->GetXaxis()->GetXmin() : arg->scanrangeMin;
float max = arg->scanrangeMin == arg->scanrangeMax ? hCL->GetXaxis()->GetXmax() : arg->scanrangeMax;
TH1F *haxes = new TH1F("haxes"+getUniqueRootName(), "", 100, min, max);
haxes->SetStats(0);
haxes->GetXaxis()->SetTitle(s->getScanVar1()->GetTitle());
haxes->GetYaxis()->SetTitle("1-CL");
haxes->GetXaxis()->SetLabelFont(font);
haxes->GetYaxis()->SetLabelFont(font);
示例2: Limit_2D_LQ
//.........这里部分代码省略.........
pad_plot->SetRightMargin(0.04);
pad_plot->SetTopMargin(0.06);
pad_plot->SetBottomMargin(0.12);
pad_plot->SetFrameFillStyle(0);
pad_plot->SetFrameLineWidth(2);
pad_plot->SetFrameBorderMode(0);
pad_plot->SetFrameFillStyle(0);
pad_plot->SetFrameLineWidth(2);
pad_plot->SetFrameBorderMode(0);
pad_plot->SetTickx(1);
pad_plot->SetTicky(1);
TH2F* frame = new TH2F("frame", "", 100, 200, 1000, 100, 0.001, 1);
TAxis* ax = frame->GetXaxis();
TAxis* ay = frame->GetYaxis();
ax->SetTitle("M_{LQ} [GeV]");
// ax->SetLabelOffset(0.01);
ay->SetTitle("#beta");
//ay->SetTitle("#Beta(LQ#rightarrow#tau b)");
// ax->SetTitleFont(132);
ax->SetTitleSize(0.05);
// ay->SetTitleFont(132);
ay->SetTitleSize(0.05);
ay->SetRangeUser(0.,1);
frame->Draw();
// grExp->SetLineColor(TColor::GetColor(0, 0, 333));
// grExp->SetFillColorAlpha(TColor::GetColor(200, 222, 285), 0.65);
// grObs->SetLineColor(TColor::GetColor(0, 0, 333));
grObs->SetFillColorAlpha(TColor::GetColor(200, 222, 285), 0.65);
// grObs->SetLineColor(kBlack);
grObs->SetLineWidth(3);
grExp->SetLineColor(kBlack);
grExp->SetLineWidth(2);
grExp->SetLineStyle(7);
// grObs->SetFillStyle(3005);
// grExp->SetLineWidth(2);
// grObs->SetLineWidth(2);
// grObs->SetFillStyle(3005);
// grObs->Draw("F");
grExp->Draw("L");
// grExp->Draw("Lsame");
// gMinusOneSigma->SetLineColor(kBlue);
gMinusOneSigma->SetLineWidth(0);
// gMinusOneSigma->SetLineStyle(2);
ci = TColor::GetColor("#fcf10f");
gMinusOneSigma->SetFillColorAlpha(15, 0.65);
gMinusOneSigma->Draw("f");
// gPlusOneSigma->SetLineColor(kBlue);
gPlusOneSigma->SetLineWidth(0);
// gPlusOneSigma->SetLineStyle(2);
// ci = TColor::GetColor("#fcf10f");
gPlusOneSigma->SetFillColor(0);