本文整理汇总了C++中TPaletteAxis::SetFillColor方法的典型用法代码示例。如果您正苦于以下问题:C++ TPaletteAxis::SetFillColor方法的具体用法?C++ TPaletteAxis::SetFillColor怎么用?C++ TPaletteAxis::SetFillColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TPaletteAxis
的用法示例。
在下文中一共展示了TPaletteAxis::SetFillColor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: printEff
void printEff(TTree* HltTree,const char *cut,const char *title, char *projectTitle)
{
cout <<" * "<<title<<":"<<endl;
cout <<" * Efficiencies:"<<endl;
double nEvt = HltTree->GetEntries(cut);
cout <<" | "<<setw(20)<<"HLT Path";
cout <<" | "<<setw(25)<<"Efficiency";
cout <<" | "<<endl;
triggers->clear();
triggerCuts->clear();
vector <double*> effs;
// calculate the efficiency //
effs.push_back(calcEff(HltTree,"L1Tech_BSC_OR",nEvt,Form("(%s)&&L1Tech_BSC_minBias_OR.v0==1",cut)));
effs.push_back(calcEff(HltTree,"L1Tech_BSC_thr1",nEvt,Form("(%s)&&L1Tech_BSC_minBias_threshold1.v0==1",cut)));
effs.push_back(calcEff(HltTree,"L1Tech_BSC_thr2",nEvt,Form("(%s)&&L1Tech_BSC_minBias_threshold2.v0==1",cut)));
effs.push_back(calcEff(HltTree,"L1Tech_BSC_inner_thr1",nEvt,Form("(%s)&&L1Tech_BSC_minBias_inner_threshold1.v0==1",cut)));
effs.push_back(calcEff(HltTree,"L1Tech_BSC_inner_thr2",nEvt,Form("(%s)&&L1Tech_BSC_minBias_inner_threshold2.v0==1",cut)));
effs.push_back(calcEff(HltTree,"L1Tech_HF_coinc_PM",nEvt,Form("(%s)&&L1Tech_HCAL_HF_coincidence_PM.v0==1",cut)));
effs.push_back(calcEff(HltTree,"HLT_MBPixel_1Track",nEvt,Form("(%s)&&HLT_MinBiasPixel_SingleTrack==1",cut)));
//effs.push_back(calcEff(HltTree,"L1Tech_BSC_splash_beam1.v0",nEvt,Form("(%s)&&L1Tech_BSC_splash_beam1.v0==1",cut)));
//effs.push_back(calcEff(HltTree,"L1Tech_BSC_splash_beam2.v0",nEvt,Form("(%s)&&L1Tech_BSC_splash_beam2.v0==1",cut)));
//effs.push_back(calcEff(HltTree,"All",nEvt,Form("(%s)&&(L1Tech_BSC_minBias_threshold1.v0||L1Tech_BSC_minBias_threshold2.v0||L1Tech_BSC_minBias_OR.v0||L1Tech_BSC_minBias_inner_threshold1.v0||L1Tech_BSC_minBias_inner_threshold2.v0||L1Tech_BSC_splash_beam1.v0||L1Tech_BSC_splash_beam2.v0)",cut)));
results->push_back(effs);
cout <<" * Correlation Matrix:"<<endl;
int tsize = (int)triggers->size();
TH2D *h = new TH2D(Form("h%s",title),"",tsize,0,tsize,tsize,0,tsize);
TH2D *hct = new TH2D(Form("h%s_ct",title),"",tsize,0,tsize,tsize,0,tsize);
for (int i=tsize-1;i>=0;i--){
int nEvtAfterCut = HltTree->GetEntries((*triggerCuts)[i].c_str());
h->GetXaxis()->SetBinLabel(i+1,(*triggers)[i].c_str());
h->GetYaxis()->SetBinLabel(i+1,(*triggers)[i].c_str());
hct->GetXaxis()->SetBinLabel(i+1,(*triggers)[i].c_str());
hct->GetYaxis()->SetBinLabel(i+1,(*triggers)[i].c_str());
for (int j=0;j<tsize;j++){
string cut ="("+(*triggerCuts)[i]+")&&("+(*triggerCuts)[j]+")";
double* eff = calcEff(HltTree,"",nEvtAfterCut,Form("%s",cut.c_str()),0);
if (nEvtAfterCut==0) eff[0]=0;
h->SetBinContent(i+1,j+1,int(eff[0]*100000)/1000.);
hct->SetBinContent(i+1,j+1,HltTree->GetEntries(cut.c_str()));
}
}
h->GetXaxis()->LabelsOption("v");
hct->GetXaxis()->LabelsOption("v");
TCanvas *c1 = new TCanvas(Form("c%s",title), Form("c_%s",title),800,600);
c1->Range(-3.609756,-1.910995,12.7561,10.60209);
c1->SetFillColor(0);
c1->SetBorderMode(0);
c1->SetBorderSize(0);
c1->SetTickx();
c1->SetTicky();
c1->SetLeftMargin(0.25);
c1->SetRightMargin(0.1684054);
c1->SetTopMargin(0.02);
c1->SetBottomMargin(0.3);
c1->SetFrameLineColor(0);
c1->SetFrameBorderMode(0);
c1->SetFrameLineColor(0);
c1->SetFrameBorderMode(0);
h->Draw("col text");
TPaletteAxis *palette = new TPaletteAxis(tsize*1.02,0,tsize*1.1,tsize,h);
palette->SetLabelColor(1);
palette->SetLabelFont(42);
palette->SetLabelOffset(0.005);
palette->SetLabelSize(0.045);
palette->SetTitleOffset(1);
palette->SetTitleSize(0.04);
palette->SetFillColor(100);
palette->SetFillStyle(1001);
h->GetListOfFunctions()->Add(palette,"br");
h->Draw("col text z");
string fname(Form("plot_%s_%s.gif",projectTitle,title));
c1->SaveAs(fname.c_str());
c1->SaveAs(Form("plot_%s_%s.C",projectTitle,title));
cout <<"<img src=\"%ATTACHURLPATH%/"<<fname<<"\" alt=\""<<fname<<"\" width='671' height='478' />"<<endl;
}
示例2: MakeBioluminescencePlots
void MakeBioluminescencePlots(){
gStyle->SetOptStat(0);
gStyle->SetCanvasColor(0);
gStyle->SetPadColor(0);
gStyle->SetPadBorderMode(0);
gStyle->SetCanvasBorderMode(0);
gStyle->SetFrameBorderMode(0);
gStyle->SetLabelSize(0.03,"x");
gStyle->SetLabelSize(0.03,"y");
gStyle->SetLabelFont(42,"x");
gStyle->SetLabelFont(42,"y");
gStyle->SetOptStat(1111);
////////////// DECLARES HISTOGRAMS /////////////////////////////////////////////////////////////
TH2D * histXY = new TH2D("histXY","",200,-15,15,200,-15,15);
///////////////////// DECLARES CHAINS ////////////////////////////////////////////////////////////
TChain *chain1 = new TChain("OpticalData","");
///////////////////////////// ADDS NTUPLES TO CHAINS ////////////////////////////////////////////
chain1->Add("./Bioluminescence_skin.root/OpticalData");
//////////////////////////////////// MAKES SELECTIONS IN EACH CHAIN ////////////////////////////////////////////////////////////
chain1->Draw("CrystalLastHitPos_Y:CrystalLastHitPos_X>>histXY","CrystalLastHitPos_Z == 30.0 && CrystalLastHitEnergy > 0.0","goff");
TCanvas *XY = new TCanvas("XY", " ",0,22,800,802);
XY->Range(-125,-125,125,125);
XY->SetGridx();
XY->SetGridy();
XY->SetTickx(1);
XY->SetTicky(1);
XY->SetFrameBorderMode(0);
XY->SetFrameBorderMode(0);
XY->SetFillColor(kWhite);
TPaletteAxis *palette = new TPaletteAxis(13.23807,-14.97093,14.93405,15.01938,histXY);
palette->SetLabelColor(1);
palette->SetLabelFont(62);
palette->SetLabelOffset(0.005);
palette->SetLabelSize(0.02);
palette->SetTitleOffset(1);
palette->SetTitleSize(0.04);
palette->SetFillColor(0);
palette->SetFillStyle(1001);
histXY->GetListOfFunctions()->Add(palette,"br");
histXY->GetXaxis()->SetTitle("x-position(mm)");
histXY->GetXaxis()->SetLabelFont(42);
histXY->GetXaxis()->SetTitleFont(42);
histXY->GetYaxis()->SetTitle("y-position(mm)");
histXY->GetYaxis()->SetLabelFont(42);
histXY->GetYaxis()->SetTitleOffset(1.43);
histXY->GetYaxis()->SetTitleFont(42);
histXY->Draw("colz");
histXY->GetXaxis()->SetTitleSize(0.03);
histXY->GetYaxis()->SetTitleSize(0.03);
histXY->GetXaxis()->SetLabelSize(0.03);
histXY->GetYaxis()->SetLabelSize(0.03);
XY->Modified();
XY->cd();
XY->SetSelected(XY);
}
示例3: BinCovarianceHggRazor
void BinCovarianceHggRazor()
{
//=========Macro generated from canvas: c1/c1
//========= (Thu Mar 16 13:20:44 2017) by ROOT version6.08/00
TCanvas *c1 = new TCanvas("c1", "c1",624,156,1045,740);
c1->Range(-2.904762,-4.218216,21.92857,21.55977);
c1->SetFillColor(0);
c1->SetBorderMode(0);
c1->SetBorderSize(2);
c1->SetLeftMargin(0.1169703);
c1->SetRightMargin(0.117929);
c1->SetBottomMargin(0.1636364);
c1->SetFrameBorderMode(0);
c1->SetFrameBorderMode(0);
TH2F *corr = new TH2F("corr","Background Covariance Matrix",19,0,19,19,0,19);
corr->SetBinContent(22,7.200001);
corr->SetBinContent(23,0.2672915);
corr->SetBinContent(24,0.001625223);
corr->SetBinContent(25,3.449828);
corr->SetBinContent(26,2.003306);
corr->SetBinContent(27,-0.1299037);
corr->SetBinContent(28,1.094266);
corr->SetBinContent(29,0.6026603);
corr->SetBinContent(30,0.3772124);
corr->SetBinContent(31,4.398799);
corr->SetBinContent(32,0.5182461);
corr->SetBinContent(33,0.4639761);
corr->SetBinContent(34,-1.045344);
corr->SetBinContent(35,-0.1582571);
corr->SetBinContent(36,3.917425);
corr->SetBinContent(37,0.3293888);
corr->SetBinContent(38,0.5363065);
corr->SetBinContent(39,0.112652);
corr->SetBinContent(40,-0.4577291);
corr->SetBinContent(43,0.2672915);
corr->SetBinContent(44,7.06);
corr->SetBinContent(45,0.02738067);
corr->SetBinContent(46,10.20474);
corr->SetBinContent(47,1.258074);
corr->SetBinContent(48,0.2655874);
corr->SetBinContent(49,0.05856049);
corr->SetBinContent(50,0.1689017);
corr->SetBinContent(51,-0.203687);
corr->SetBinContent(52,-1.356623);
corr->SetBinContent(53,-0.1403674);
corr->SetBinContent(54,0.1150756);
corr->SetBinContent(55,-1.715165);
corr->SetBinContent(56,0.3716204);
corr->SetBinContent(57,1.576942);
corr->SetBinContent(58,0.4120814);
corr->SetBinContent(59,-0.5644981);
corr->SetBinContent(60,2.312829);
corr->SetBinContent(61,-0.1745173);
corr->SetBinContent(64,0.001625223);
corr->SetBinContent(65,0.02738067);
corr->SetBinContent(66,6.85);
corr->SetBinContent(67,2.261283);
corr->SetBinContent(68,1.963802);
corr->SetBinContent(69,0.0992774);
corr->SetBinContent(70,0.2134901);
corr->SetBinContent(71,0.4936861);
corr->SetBinContent(72,0.09001485);
corr->SetBinContent(73,3.081846);
corr->SetBinContent(74,-0.03320625);
corr->SetBinContent(75,0.02650541);
corr->SetBinContent(76,0.5989376);
corr->SetBinContent(77,0.2271089);
corr->SetBinContent(78,1.603218);
corr->SetBinContent(79,0.2573114);
corr->SetBinContent(80,-0.2396841);
corr->SetBinContent(81,-0.8127553);
corr->SetBinContent(82,0.8586979);
corr->SetBinContent(85,3.456811);
corr->SetBinContent(86,10.22542);
corr->SetBinContent(87,2.265859);
corr->SetBinContent(88,1809.14);
corr->SetBinContent(89,-1.012275);
corr->SetBinContent(90,6.697715);
corr->SetBinContent(91,9.605417);
corr->SetBinContent(92,-0.8592414);
corr->SetBinContent(93,4.409427);
corr->SetBinContent(94,54.40217);
corr->SetBinContent(95,-1.380551);
corr->SetBinContent(96,1.818917);
corr->SetBinContent(97,40.60707);
corr->SetBinContent(98,-3.56902);
corr->SetBinContent(99,106.0525);
corr->SetBinContent(100,-2.953686);
corr->SetBinContent(101,2.048589);
corr->SetBinContent(102,-36.2908);
corr->SetBinContent(103,4.93098);
corr->SetBinContent(106,2.007359);
corr->SetBinContent(107,1.260622);
corr->SetBinContent(108,1.967779);
corr->SetBinContent(109,-1.012275);
corr->SetBinContent(110,256.49);
corr->SetBinContent(111,1.281127);
corr->SetBinContent(112,2.073658);
corr->SetBinContent(113,2.264486);
//.........这里部分代码省略.........