当前位置: 首页>>代码示例>>C++>>正文


C++ TPaletteAxis::SetTitleSize方法代码示例

本文整理汇总了C++中TPaletteAxis::SetTitleSize方法的典型用法代码示例。如果您正苦于以下问题:C++ TPaletteAxis::SetTitleSize方法的具体用法?C++ TPaletteAxis::SetTitleSize怎么用?C++ TPaletteAxis::SetTitleSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TPaletteAxis的用法示例。


在下文中一共展示了TPaletteAxis::SetTitleSize方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: PlotChargeFieldFocus2D


//.........这里部分代码省略.........
  // middle plots
  pad[1] = new TPad("padm", "padm",0.00, bMargin + vStep + vSpacing,
		    lMargin + hStep + rMargin, bMargin + 2.*vStep );
  pad[1]->SetLeftMargin(1./(lMargin+hStep)*lMargin);
  pad[1]->SetRightMargin((1./(rMargin+hStep)*rMargin));
  pad[1]->SetBottomMargin(0.0);                                   
  pad[1]->SetTopMargin(0.);
  pad[1]->Draw();          

  // bottom plots
  pad[2] = new TPad("padb", "padb",0.00, 0.,lMargin+hStep+rMargin,bMargin+vStep);
  pad[2]->SetLeftMargin(1./(lMargin+hStep)*lMargin);
  pad[2]->SetRightMargin((1./(rMargin+hStep)*rMargin));
  pad[2]->SetBottomMargin(1./(bMargin+vStep)*bMargin);
  pad[2]->SetTopMargin(0.);
  pad[2]->Draw();       
  
  // Draw!
  pad[0]->cd(); // <---------------------------------------------- Top Plot ---------
  if(opt.Contains("logz")) {
    pad[0]->SetLogz(1);
  } else {
    pad[0]->SetLogz(0);
  }
  pad[0]->SetFrameLineWidth(3);  

  TH2F *hFrame = (TH2F*) gROOT->FindObject("hFrame1");
  if(hFrame) delete hFrame;
  hFrame = (TH2F*) hDen2D[0]->Clone("hFrame1");
  hFrame->Reset();

  hFrame->GetXaxis()->SetLabelOffset(999);

  hFrame->GetYaxis()->SetTitleSize(0.075);
  hFrame->GetYaxis()->SetTitleOffset(0.65);
  hFrame->GetYaxis()->SetLabelSize(0.065);
  hFrame->GetYaxis()->SetLabelOffset(0.02);
  hFrame->GetYaxis()->SetTickLength(0.02);
 
  hFrame->GetZaxis()->SetTitleSize(0.06);                        
  hFrame->GetZaxis()->SetTitleOffset(0.45);
  hFrame->GetZaxis()->SetLabelSize(0.06);  
  hFrame->GetZaxis()->SetTickLength(0.02);
  //  hFrame->GetZaxis()->SetNdivisions(505);

  hFrame->Draw("col");            

  if(Nspecies>=3) {
    if(hDen2D[2]) {
      exHot->Draw();
      hDen2D[2]->Draw("colz same");
    }
  }

  exPlasma->Draw();
  hDen2D[0]->Draw("colz same");
  
  if(hDen2D[1]) {
    exElec->Draw();
    hDen2D[1]->Draw("colz same");
  }
  
  if(opt.Contains("1dline")) {
    lineYzero->Draw();
    lineYdown->Draw();
    lineYup->Draw();
开发者ID:delaossa,项目名称:ptools,代码行数:67,代码来源:PlotChargeFieldFocus2D.130705.C

示例2: PlotRakeBunch


//.........这里部分代码省略.........
    hfactor = hposl-hposr;

    char name[16];
    sprintf(name,"pad_%i",k);
    pad[k] = new TPad(name,"",hposl,vposd,hposr,vposu);
    // // cout << Form("%f %f %f %f",hposl,vposd,hposr,vposu) << endl;
    // // cout << Form("%f %f %f %f",hmarl,vmard,hmarr,vmaru) << endl;
    pad[k]->SetLeftMargin(hmarl);
    pad[k]->SetRightMargin(hmarr);  
    pad[k]->SetBottomMargin(vmard);
    pad[k]->SetTopMargin(vmaru);
    pad[k]->SetFrameLineWidth(3);
    
    sprintf(name,"hFrame_%i",k);  
    hFrame[k] = (TH1F*) gROOT->FindObject(name);
    if(hFrame[k]) delete hFrame[k];
    hFrame[k] = (TH1F*) hX1->Clone(name);
    hFrame[k]->Reset();
    
    hFrame[k]->GetXaxis()->CenterTitle();
    hFrame[k]->GetYaxis()->CenterTitle();
    hFrame[k]->GetZaxis()->CenterTitle();
    hFrame[k]->SetLabelFont(42,"xyz");
    hFrame[k]->SetTitleFont(42,"xyz");
  
    hFrame[k]->SetNdivisions(505,"xyz");
  
    hFrame[k]->SetTickLength(0.04,"xyz");
    hFrame[k]->SetTickLength(0.04*vfactor,"y");
  
    hFrame[k]->GetYaxis()->SetLabelSize(0.04/vfactor);
    hFrame[k]->GetYaxis()->SetLabelOffset(0.02);
  
    hFrame[k]->GetYaxis()->SetTitleSize(0.05/vfactor);
    hFrame[k]->GetYaxis()->SetTitleOffset(1.2*vfactor);

    if(k==0) {  
      hFrame[k]->GetXaxis()->SetLabelSize(0.08);
      hFrame[k]->GetXaxis()->SetLabelOffset(0.02);
      hFrame[k]->GetXaxis()->SetTitleSize(0.12);
      hFrame[k]->GetXaxis()->SetTitleOffset(1.0);
    } else {
      hFrame[k]->GetXaxis()->SetLabelSize(0.0);
      hFrame[k]->GetXaxis()->SetTitleSize(0.0);
    }


  }

  // Ranges!!
  Double_t yMin =  999.9;
  Double_t yMax =  -999.9;
  for(Int_t k=0;k<SNbin;k++) {
    if(semittance[k]<yMin)
      yMin = semittance[k];
    
    if(semittance[k]>yMax)
      yMax = semittance[k];

    if(sErms[k]<yMin)
      yMin = sErms[k];
    
    if(sErms[k]>yMax)
      yMax = sErms[k];
  }
开发者ID:delaossa,项目名称:ptools,代码行数:66,代码来源:PlotRakeBunch.130712.C

示例3: PlotEvolutionsWIII


//.........这里部分代码省略.........
  Float_t txoffset = (250/ypadsize) * 2.4 / (950/ysize);
  Float_t lxoffset = 0.015;
  Float_t tyoffset = 1.2 / (950/ysize);
  Float_t lyoffset = 0.01;
  Float_t tzoffset = 1.4 / (950/ysize);
  Float_t lzoffset = 0.01;
  Float_t tylength = 0.015;
  Float_t txlength = 0.04;
  for(Int_t i=NPad-1;i>=0;i--) {
    char name[16];
    sprintf(name,"pad_%i",i);
    pad[i] = (TPad*) gROOT->FindObject(name);
    pad[i]->SetFrameLineWidth(2);  
    pad[i]->SetTickx(1);
    pad[i]->SetTicky(1);
    if(opt.Contains("trans"))
      pad[i]->SetFillStyle(4000);
    pad[i]->SetFrameFillStyle(4000);

    sprintf(name,"hFrame_%i",i);
    hFrame[i] = (TH2F*) gROOT->FindObject(name);
    if(hFrame[i]) delete hFrame[i];
    hFrame[i] = (TH2F*) hEvsTime[0]->Clone(name);
    hFrame[i]->Reset();
    
    Float_t xFactor = pad[NPad-1]->GetAbsWNDC()/pad[i]->GetAbsWNDC();
    Float_t yFactor = pad[NPad-1]->GetAbsHNDC()/pad[i]->GetAbsHNDC();

    // Format for y axis
    hFrame[i]->GetYaxis()->SetLabelFont(fonttype);
    hFrame[i]->GetYaxis()->SetLabelSize(lysize);
    hFrame[i]->GetYaxis()->SetLabelOffset(lyoffset);
    hFrame[i]->GetYaxis()->SetTitleFont(fonttype);
    hFrame[i]->GetYaxis()->SetTitleSize(tysize);
    hFrame[i]->GetYaxis()->SetTitleOffset(tyoffset);

    hFrame[i]->GetYaxis()->SetTickLength(xFactor*tylength/yFactor);

    // Format for x axis
    hFrame[i]->GetXaxis()->SetLabelFont(fonttype);
    hFrame[i]->GetXaxis()->SetLabelSize(lxsize);
    hFrame[i]->GetXaxis()->SetLabelOffset(lxoffset);
    hFrame[i]->GetXaxis()->SetTitleFont(fonttype);
    hFrame[i]->GetXaxis()->SetTitleSize(txsize);
    hFrame[i]->GetXaxis()->SetTitleOffset(txoffset);
    
    hFrame[i]->GetXaxis()->SetTickLength(yFactor*txlength/xFactor);      

    if(i>0) { // skip x axis labels except for the lowest one
      hFrame[i]->GetXaxis()->SetLabelSize(0.0);
      hFrame[i]->GetXaxis()->SetTitleSize(0.0);
    }

    if(opt.Contains("nomar")) {
      hFrame[i]->GetYaxis()->SetTickLength(0.0);
      hFrame[i]->GetXaxis()->SetTickLength(0.0);      
    }

    // Labels for the frames

  }

  // Access to color Palettes 
  TExec *exPlasma = new TExec("exPlasma","plasmaPalette->cd();");
  TExec *exElec   = new TExec("exElec","electron0Palette->cd();");
  TExec *exHot    = new TExec("exHot","hotPalette->cd();");
开发者ID:delaossa,项目名称:ptools,代码行数:67,代码来源:PlotEvolutionsWIII.C

示例4: PlotRakeInjection


//.........这里部分代码省略.........
    pad[k]->SetBottomMargin(vmard);
    pad[k]->SetTopMargin(vmaru);
  
    pad[k]->SetFrameLineWidth(3);  
    if(opt.Contains("logz")) {
      pad[k]->SetLogz(1);
    } else {
      pad[k]->SetLogz(0);
    }
    pad[k]->Draw();
    pad[k]->cd();
    
    sprintf(name,"hFrame_%i",k);  
    hFrame[k] = (TH2F*) gROOT->FindObject(name);
    if(hFrame[k]) delete hFrame[k];
    hFrame[k] = (TH2F*) hDen2D[k][0]->Clone(name);
    hFrame[k]->Reset();
  
    hFrame[k]->GetXaxis()->CenterTitle();
    hFrame[k]->GetYaxis()->CenterTitle();
    hFrame[k]->GetZaxis()->CenterTitle();

    hFrame[k]->SetLabelFont(42,"xyz");
    hFrame[k]->SetTitleFont(42,"xyz");
  
    hFrame[k]->SetNdivisions(505,"xyz");
  
    hFrame[k]->SetTickLength(0.04,"xyz");
    hFrame[k]->SetTickLength(0.04*vfactor,"y");
  
    hFrame[k]->GetYaxis()->SetLabelSize(0.03/vfactor);
    hFrame[k]->GetYaxis()->SetLabelOffset(0.02);
  
    hFrame[k]->GetYaxis()->SetTitleSize(0.03/vfactor);
    hFrame[k]->GetYaxis()->SetTitleOffset(999.0*vfactor);
  
    if(k==0) {  
      hFrame[k]->GetXaxis()->SetLabelSize(0.10);
      hFrame[k]->GetXaxis()->SetLabelOffset(0.02);
      hFrame[k]->GetXaxis()->SetTitleSize(0.14);
      hFrame[k]->GetXaxis()->SetTitleOffset(1.0);
    } else {
      hFrame[k]->GetXaxis()->SetLabelSize(0.0);
      hFrame[k]->GetXaxis()->SetTitleSize(0.0);
    }
  
    hFrame[k]->Draw("axis");    
  


    exPlasma->Draw();

    // Sum of histograms!
    hDen2D[k][0]->Add(hDen2D[k][1]);
        
    //    hDen2D[k][0]->GetZaxis()->SetRangeUser(Min[1],Max[1]);
 
    hDen2D[k][0]->Draw("colz same");
    
    pad[k]->Update();
    TPaletteAxis *palette = (TPaletteAxis*)hDen2D[k][0]->GetListOfFunctions()->FindObject("palette");
    
    Float_t y1 = pad[k]->GetBottomMargin();
    Float_t y2 = 1 - pad[k]->GetTopMargin();
    Float_t x1 = pad[k]->GetLeftMargin();
    Float_t x2 = 1 - pad[k]->GetRightMargin();
开发者ID:delaossa,项目名称:ptools,代码行数:67,代码来源:PlotRakeInjection.C

示例5: 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);



}
开发者ID:Alvarness,项目名称:Gate,代码行数:70,代码来源:MakeBioluminescencePlots.C

示例6: PlotPotential2D


//.........这里部分代码省略.........
    TPaveText **textLabel = new TPaveText*[2];

    C->cd(0);
    char pname[16];
    sprintf(pname,"pad_%i",1);
    pad[0] = (TPad*) gROOT->FindObject(pname);
    pad[0]->Draw();
    pad[0]->cd(); // <---------------------------------------------- Top Plot ---------
    if(opt.Contains("logz")) {
        pad[0]->SetLogz(1);
    } else {
        pad[0]->SetLogz(0);
    }
    pad[0]->SetFrameLineWidth(3);
    pad[0]->SetTickx(1);

    // Re-range:
    for(Int_t i=0; i<Nspecies; i++) {
        if(!hDen2D[i]) continue;
        hDen2D[i]->GetYaxis()->SetRangeUser(yMin -(factor-1)*yRange, yMax);
    }


    TH2F *hFrame = (TH2F*) gROOT->FindObject("hFrame1");
    if(hFrame) delete hFrame;
    hFrame = (TH2F*) hDen2D[0]->Clone("hFrame1");
    hFrame->Reset();

    hFrame->SetLabelFont(42,"xyz");
    hFrame->SetTitleFont(42,"xyz");

    hFrame->GetYaxis()->SetNdivisions(505);
    hFrame->GetYaxis()->SetLabelSize(0.085);
    hFrame->GetYaxis()->SetTitleSize(0.09);
    hFrame->GetYaxis()->SetTitleOffset(0.7);
    hFrame->GetYaxis()->SetTickLength(0.02);

    hFrame->GetXaxis()->SetLabelOffset(999.);
    hFrame->GetXaxis()->SetTitleOffset(999.);
    hFrame->GetXaxis()->SetTickLength(0.04);

    // Frame asymmetry:
    hFrame->Draw("col");

    // hDen2D[0]->GetZaxis()->SetNdivisions(505);

    // Injected electrons if any
    if(Nspecies>=3) {
        if(hDen2D[2]) {
            exHot->Draw();
            hDen2D[2]->Draw("colz same");
        }
    }

    // Plasma
    hDen2D[0]->GetZaxis()->SetTitleFont(42);
    exPlasma->Draw();
    hDen2D[0]->Draw("colz same");

    // Beam driver.
    if(hDen2D[1]) {
        //    hDen2D[1]->GetZaxis()->SetNdivisions(505);
        exElec->Draw();
        hDen2D[1]->Draw("colz same");
    }
开发者ID:delaossa,项目名称:ptools,代码行数:66,代码来源:PlotPotential2D.C

示例7: 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;   
}
开发者ID:CmsHI,项目名称:CVS_SavedFMa,代码行数:86,代码来源:trigAnaCorrelation.C

示例8: BinCovarianceHggRazor


//.........这里部分代码省略.........
   corr->SetBinContent(418,30.42);
   corr->SetMinimum(-4000);
   corr->SetMaximum(4000);
   corr->SetEntries(361);
   corr->SetStats(0);
   corr->SetContour(20);
   corr->SetContourLevel(0,-4000);
   corr->SetContourLevel(1,-3600);
   corr->SetContourLevel(2,-3200);
   corr->SetContourLevel(3,-2800);
   corr->SetContourLevel(4,-2400);
   corr->SetContourLevel(5,-2000);
   corr->SetContourLevel(6,-1600);
   corr->SetContourLevel(7,-1200);
   corr->SetContourLevel(8,-800);
   corr->SetContourLevel(9,-400);
   corr->SetContourLevel(10,0);
   corr->SetContourLevel(11,400);
   corr->SetContourLevel(12,800);
   corr->SetContourLevel(13,1200);
   corr->SetContourLevel(14,1600);
   corr->SetContourLevel(15,2000);
   corr->SetContourLevel(16,2400);
   corr->SetContourLevel(17,2800);
   corr->SetContourLevel(18,3200);
   corr->SetContourLevel(19,3600);
   
   TPaletteAxis *palette = new TPaletteAxis(19.11905,-0.7931685,20.2619,19.82922,corr);
palette->SetLabelColor(1);
palette->SetLabelFont(42);
palette->SetLabelOffset(0.005);
palette->SetLabelSize(0.035);
palette->SetTitleOffset(1);
palette->SetTitleSize(0.035);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#f9f90e");
   palette->SetFillColor(ci);
   palette->SetFillStyle(1001);
   corr->GetListOfFunctions()->Add(palette,"br");

   ci = TColor::GetColor("#000099");
   corr->SetLineColor(ci);
   corr->GetXaxis()->SetBinLabel(1,"Bin 0");
   corr->GetXaxis()->SetBinLabel(2,"Bin 1");
   corr->GetXaxis()->SetBinLabel(3,"Bin 2");
   corr->GetXaxis()->SetBinLabel(4,"Bin 3");
   corr->GetXaxis()->SetBinLabel(5,"Bin 4");
   corr->GetXaxis()->SetBinLabel(6,"Bin 5");
   corr->GetXaxis()->SetBinLabel(7,"Bin 6");
   corr->GetXaxis()->SetBinLabel(8,"Bin 7");
   corr->GetXaxis()->SetBinLabel(9,"Bin 8");
   corr->GetXaxis()->SetBinLabel(10,"Bin 9 HighRes");
   corr->GetXaxis()->SetBinLabel(11,"Bin 10 HighRes");
   corr->GetXaxis()->SetBinLabel(12,"Bin 11 HighRes");
   corr->GetXaxis()->SetBinLabel(13,"Bin 12 HighRes");
   corr->GetXaxis()->SetBinLabel(14,"Bin 13 HighRes");
   corr->GetXaxis()->SetBinLabel(15,"Bin 9 LowRes");
   corr->GetXaxis()->SetBinLabel(16,"Bin 10 LowRes");
   corr->GetXaxis()->SetBinLabel(17,"Bin 11 LowRes");
   corr->GetXaxis()->SetBinLabel(18,"Bin 12 LowRes");
   corr->GetXaxis()->SetBinLabel(19,"Bin 13 LowRes");
   corr->GetXaxis()->SetBit(TAxis::kLabelsVert);
   corr->GetXaxis()->SetLabelFont(42);
   corr->GetXaxis()->SetLabelSize(0.035);
开发者ID:RazorCMS,项目名称:RazorEWKSUSYAnalysis,代码行数:67,代码来源:BinCovarianceHggRazor.C

示例9: PlotField2D


//.........这里部分代码省略.........
  Float_t rMargin = 0.18;
  Float_t bMargin = 0.20;
  Float_t tMargin = 0.06;
  gPad->SetLeftMargin(lMargin);
  gPad->SetRightMargin(rMargin);
  gPad->SetBottomMargin(bMargin);
  gPad->SetTopMargin(tMargin);
  
  if(opt.Contains("logz")) {
    gPad->SetLogz(1);
  } else {
    gPad->SetLogz(0);
  }
  gPad->SetFrameLineWidth(2);  

  // Define the frames for plotting
  Int_t fonttype = 43;
  Int_t fontsize = 28;
  Int_t tfontsize = 30;
  Float_t txoffset = 1.3;
  Float_t lxoffset = 0.02;
  Float_t tyoffset = 1.0;
  Float_t lyoffset = 0.01;
  Float_t tylength = 0.02;
  Float_t txlength = 0.04;

  TH2F *hFrame = (TH2F*) gROOT->FindObject("hFrame");
  if(hFrame) delete hFrame;
  hFrame = (TH2F*) hE2D[index]->Clone("hFrame");
  hFrame->Reset();

  // Format for y axis
  hFrame->GetYaxis()->SetTitleFont(fonttype);
  hFrame->GetYaxis()->SetTitleSize(tfontsize);
  hFrame->GetYaxis()->SetTitleOffset(tyoffset);
  hFrame->GetYaxis()->SetLabelFont(fonttype);
  hFrame->GetYaxis()->SetLabelSize(fontsize);
  hFrame->GetYaxis()->SetLabelOffset(lyoffset);

  hFrame->GetYaxis()->SetTickLength(tylength);

  // Format for x axis
  hFrame->GetXaxis()->SetTitleFont(fonttype);
  hFrame->GetXaxis()->SetTitleSize(tfontsize+2);
  hFrame->GetXaxis()->SetTitleOffset(txoffset);
  hFrame->GetXaxis()->SetLabelFont(fonttype);
  hFrame->GetXaxis()->SetLabelSize(fontsize+2);
  hFrame->GetXaxis()->SetLabelOffset(lxoffset);
    
  hFrame->GetXaxis()->SetTickLength(txlength);      

  hFrame->Draw("col");            
 
  //  hE2D[index]->GetZaxis()->SetNdivisions(505);  
  hE2D[index]->GetZaxis()->SetTitleFont(fonttype);
  hE2D[index]->Draw("colz same");
    
  // Re-touchs
  gPad->Update();

  Float_t y1 = gPad->GetBottomMargin();
  Float_t y2 = 1 - gPad->GetTopMargin();
  Float_t x1 = gPad->GetLeftMargin();
  Float_t x2 = 1 - gPad->GetRightMargin();
  Float_t gap = 0.005;  
开发者ID:delaossa,项目名称:ptools,代码行数:66,代码来源:PlotField2D.C


注:本文中的TPaletteAxis::SetTitleSize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。