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


C++ TCanvas::SetBottomMargin方法代码示例

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


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

示例1: newTCanvas

TCanvas * newTCanvas(char* rootname, char* title){
	TCanvas * canv =new TCanvas( rootname, title, 800, 800);
	canv->SetTopMargin(0.06);
	canv->SetBottomMargin(0.15);
	canv->cd();
	return canv;
}
开发者ID:fiveisgreen,项目名称:FNAL_Crane,代码行数:7,代码来源:CMSStyle_old.C

示例2: TCanvas

void
Compare(const TString& mode1,
        const TString& mode2)
{
  TH1* h1 = 0;
  TH1* h2 = 0;
  TH1* r1 = 0;
  TH1* i1 = 0;
  TH1* r2 = 0;
  TH1* i2 = 0;
  TProfile* t1 = 0;
  TProfile* t2 = 0;

  if (!GetHistos(mode1, h1, r1, i1, t1)) return;
  if (!GetHistos(mode2, h2, r2, i2, t2)) return;

  TCanvas* can = new TCanvas("comp", "Comparison", 1200, 800);
  can->SetTopMargin(0.15);
  can->SetBottomMargin(0.15);
  can->SetRightMargin(0.03);
  can->SetLeftMargin(0.03);
  can->Divide(2, 2);
  
  DrawTwoInPad(can, 4, t1, t2, true, true);
  DrawTwoInPad(can, 3, i1, i2, true, false, true);
  DrawTwoInPad(can, 2, r1, r2, true);
  DrawTwoInPad(can, 1, h1, h2, false);

  can->Modified();
  can->Update();
  can->cd();

  can->Print(Form("%s_%s.png", mode1.Data(), mode2.Data()));
}
开发者ID:BetterWang,项目名称:mcorrelations,代码行数:34,代码来源:Compare.C

示例3: MakeCanvas

TCanvas* MakeCanvas(const char* name, const char *title, int dX, int dY)
{
  // Start with a canvas
  TCanvas *canvas = new TCanvas(name,title,0,0,dX,dY);
  // General overall stuff
  canvas->SetFillColor      (0);
  canvas->SetBorderMode     (0);
  canvas->SetBorderSize     (10);
  // Set margins to reasonable defaults
  canvas->SetLeftMargin     (0.20);
  canvas->SetRightMargin    (0.05);
  canvas->SetTopMargin      (0.08);
  canvas->SetBottomMargin   (0.15);
  // Setup a frame which makes sense
  canvas->SetFrameFillStyle (0);
  canvas->SetFrameLineStyle (0);
  canvas->SetFrameBorderMode(0);
  canvas->SetFrameBorderSize(10);
  canvas->SetFrameFillStyle (0);
  canvas->SetFrameLineStyle (0);
  canvas->SetFrameBorderMode(0);
  canvas->SetFrameBorderSize(10);

  return canvas;
}
开发者ID:gitytakahas,项目名称:YutaMemo,代码行数:25,代码来源:MyStyle.C

示例4: getaCanvas

// -----------------------------------------------------------------------------
//
TCanvas* getaCanvas(TString name,TDirectory* afile, bool log)
{
  afile->cd();
  TCanvas* aCanvas = new TCanvas(name);
  gStyle->SetOptFit(1);
  gStyle->SetOptStat(0);
  aCanvas->Range(-288.2483,-2.138147,1344.235,6.918939);
  aCanvas->SetFillColor(0);
  aCanvas->SetBorderMode(0);
  aCanvas->SetBorderSize(2);
  if ( log == true)aCanvas->SetLogy();
  aCanvas->SetLeftMargin(0.1765705);
  aCanvas->SetRightMargin(0.05772496);
  aCanvas->SetTopMargin(0.04778761);
  aCanvas->SetBottomMargin(0.1256637);
  aCanvas->SetFrameFillStyle(0);
  aCanvas->SetFrameLineWidth(2);
  aCanvas->SetFrameBorderMode(0);
  aCanvas->SetFrameFillStyle(0);
  aCanvas->SetFrameLineWidth(2);
  aCanvas->SetFrameBorderMode(0);
 
  
  return aCanvas;
}
开发者ID:bainbrid,项目名称:usercode,代码行数:27,代码来源:compare.C

示例5: setCanvasStyle

//------------------------------------------------------------------------------
void  PlotAlignmentValidation::setCanvasStyle( TCanvas& canv )
{
  canv.SetFillStyle   ( 4000 );
  canv.SetLeftMargin  ( 0.15 );
  canv.SetRightMargin ( 0.05 );
  canv.SetBottomMargin( 0.15 );
  canv.SetTopMargin   ( 0.12 );
}
开发者ID:HeinerTholen,项目名称:cmssw,代码行数:9,代码来源:PlotAlignmentValidation.C

示例6: canvasStyle

void canvasStyle(TCanvas& canv) 
{
  canv.SetFillStyle   ( 4000 );
  canv.SetLeftMargin  ( 0.20 );
  canv.SetRightMargin ( 0.05 );
  canv.SetBottomMargin( 0.15 );
  canv.SetTopMargin   ( 0.05 );
}
开发者ID:eschliec,项目名称:TopAnalysis,代码行数:8,代码来源:wjetsAsymmetrieEstimator.C

示例7: showGraph

void showGraph(double canvasSizeX, double canvasSizeY,
	       TGraph* graph, 
	       bool useLogScaleX, double xMin, double xMax, const std::string& xAxisTitle, double xAxisOffset,
	       bool useLogScaleY, double yMin, double yMax, const std::string& yAxisTitle, double yAxisOffset,
	       const std::string& outputFileName)
{
  TCanvas* canvas = new TCanvas("canvas", "canvas", canvasSizeX, canvasSizeY);
  canvas->SetFillColor(10);
  canvas->SetBorderSize(2); 
  canvas->SetTopMargin(0.05);
  canvas->SetLeftMargin(0.19);
  canvas->SetBottomMargin(0.19);
  canvas->SetRightMargin(0.05);
  canvas->SetLogx(useLogScaleX);
  canvas->SetLogy(useLogScaleY);

  TH1* dummyHistogram = new TH1D("dummyHistogram", "dummyHistogram", 10, xMin, xMax);
  dummyHistogram->SetTitle("");
  dummyHistogram->SetStats(false);
  dummyHistogram->SetMinimum(yMin);
  dummyHistogram->SetMaximum(yMax);
  dummyHistogram->Draw("axis");

  TAxis* xAxis = dummyHistogram->GetXaxis();
  xAxis->SetTitle(xAxisTitle.data());
  xAxis->SetTitleOffset(xAxisOffset);
  xAxis->SetTitleSize(0.065);
  xAxis->SetLabelSize(0.055);
  xAxis->SetLabelOffset(0.01);
  xAxis->SetTickLength(0.055);
  xAxis->SetNdivisions(505);

  TAxis* yAxis = dummyHistogram->GetYaxis();
  yAxis->SetTitle(yAxisTitle.data());
  yAxis->SetTitleOffset(yAxisOffset);
  yAxis->SetTitleSize(0.070);
  yAxis->SetLabelSize(0.055);
  yAxis->SetLabelOffset(0.01);
  yAxis->SetTickLength(0.055);
  yAxis->SetNdivisions(505);

  graph->SetMarkerColor(1);
  graph->SetLineColor(1);
  graph->Draw("p");

  canvas->Update();
  size_t idx = outputFileName.find_last_of('.');
  std::string outputFileName_plot = std::string(outputFileName, 0, idx);
  if ( useLogScaleY ) outputFileName_plot.append("_log");
  else outputFileName_plot.append("_linear");
  if ( idx != std::string::npos ) canvas->Print(std::string(outputFileName_plot).append(std::string(outputFileName, idx)).data());
  canvas->Print(std::string(outputFileName_plot).append(".png").data());
  //canvas->Print(std::string(outputFileName_plot).append(".pdf").data());
  //canvas->Print(std::string(outputFileName_plot).append(".root").data());
  
  delete dummyHistogram;
  delete canvas;  
}
开发者ID:veelken,项目名称:SVfitMEM_paper,代码行数:58,代码来源:makeSVfitMEM_xSectionPlot.C

示例8: makeCanvas

//------------------------------------------------------------//
// Make canvas
//------------------------------------------------------------//
TCanvas* makeCanvas(TString name)
{

  TCanvas* c = new TCanvas(name.Data(), name.Data(), 700, 500);
  c->SetTicks(1,1);
  c->SetTopMargin(0.05);
  c->SetRightMargin(0.05);
  c->SetBottomMargin(0.12);
  c->SetLeftMargin(0.12);
  
  return c;
}
开发者ID:mrelich,项目名称:IceBlockAna,代码行数:15,代码来源:myHist.C

示例9: getaCanvas

TCanvas* getaCanvas(TString name)
{

  TCanvas* aCanvas = new TCanvas(name);

  aCanvas->SetFillColor(0);
  aCanvas->SetBottomMargin(0.125);
  aCanvas->SetLeftMargin(0.125);
  aCanvas->SetFrameFillColor(0);
  aCanvas->SetFrameBorderMode(0);
  aCanvas->SetFrameLineWidth(2);
  return aCanvas;
}
开发者ID:bluejelibaby,项目名称:AnalysisV2,代码行数:13,代码来源:makeEtaPlots_Signal_andW.C

示例10: getaCanvas

TCanvas* getaCanvas(TString name)
{

  TCanvas* aCanvas = new TCanvas(name,"",292,55,500,700);//,"",181,237,1575,492);

  aCanvas->SetFillColor(0);
  aCanvas->SetBottomMargin(0.125);
  aCanvas->SetLeftMargin(0.125);
  aCanvas->SetFrameFillColor(0);
  aCanvas->SetFrameBorderMode(0);
  aCanvas->SetFrameLineWidth(2);
  return aCanvas;
}
开发者ID:tapperad,项目名称:HCALprefiringAnalysis,代码行数:13,代码来源:compare_samples.C

示例11: showHistograms

void showHistograms(double canvasSizeX, double canvasSizeY,
		    TH1* histogram, 
		    double xMin, double xMax, const std::string& xAxisTitle, double xAxisOffset,
		    bool useLogScale, double yMin, double yMax, const std::string& yAxisTitle, double yAxisOffset,
		    const std::string& outputFileName)
{
  TCanvas* canvas = new TCanvas("canvas", "canvas", canvasSizeX, canvasSizeY);
  canvas->SetFillColor(10);
  canvas->SetBorderSize(2);
  canvas->SetLeftMargin(0.15);
  canvas->SetBottomMargin(0.15);
  canvas->SetLogy(useLogScale);

  histogram->SetTitle("");
  histogram->SetStats(true);
  histogram->SetMinimum(yMin);
  histogram->SetMaximum(yMax);
  histogram->SetLineColor(1);
  histogram->SetLineWidth(2);
  histogram->SetMarkerColor(1);
  histogram->SetMarkerStyle(20);
  histogram->SetMarkerSize(1.5);
  histogram->Draw("hist");

  TAxis* xAxis = histogram->GetXaxis();
  xAxis->SetRangeUser(xMin, xMax);
  xAxis->SetTitle(xAxisTitle.data());
  xAxis->SetTitleSize(0.060);
  xAxis->SetTitleOffset(xAxisOffset);
  xAxis->SetLabelSize(0.050);
  xAxis->SetNdivisions(505);

  TAxis* yAxis = histogram->GetYaxis();
  yAxis->SetTitle(yAxisTitle.data());
  yAxis->SetTitleSize(0.060);
  yAxis->SetTitleOffset(yAxisOffset);
  yAxis->SetLabelSize(0.050);
  yAxis->SetNdivisions(505);

  canvas->Update();
  size_t idx = outputFileName.find_last_of('.');
  std::string outputFileName_plot = std::string(outputFileName, 0, idx);
  if ( useLogScale ) outputFileName_plot.append("_log");
  else outputFileName_plot.append("_linear");
  if ( idx != std::string::npos ) canvas->Print(std::string(outputFileName_plot).append(std::string(outputFileName, idx)).data());
  //canvas->Print(std::string(outputFileName_plot).append(".png").data());
  canvas->Print(std::string(outputFileName_plot).append(".pdf").data());
  //canvas->Print(std::string(outputFileName_plot).append(".root").data());
  
  delete canvas;  
}
开发者ID:veelken,项目名称:SVfitMEM,代码行数:51,代码来源:makeTFNormalizationPlots.C

示例12: canvasName

TGraph2D LoadTGraph2D(TString name)
{
    gROOT->ProcessLine(".x " + name + ".C");    
    std::string canvasName(name + "Canvas");
    TCanvas *pTCanvas = new TCanvas(canvasName.c_str(), canvasName.c_str(), 800, 600);
    pTCanvas->SetTopMargin(0.05);
    pTCanvas->SetBottomMargin(0.15);
    pTCanvas->SetLeftMargin(0.15);
    pTCanvas->SetRightMargin(0.05);

    gPad->SetTheta(30); // default is 30
    gPad->SetPhi(120); // default is 30
    gPad->Update();

    TH3F *pTH3F = new TH3F("AxisName","",100,-0.04,0.04,100,-0.04,0.04,100,0.75,1.25);
    pTH3F->GetXaxis()->SetTitle("#alpha_{4}");
    pTH3F->GetXaxis()->CenterTitle();
    pTH3F->GetXaxis()->SetLabelSize(0.05);
    pTH3F->GetXaxis()->SetTitleSize(0.05);
    pTH3F->GetXaxis()->SetTitleOffset(1.75);
    pTH3F->GetXaxis()->SetNdivisions(5);
    pTH3F->GetYaxis()->SetTitle("#alpha_{5}");
    pTH3F->GetYaxis()->CenterTitle();
    pTH3F->GetYaxis()->SetLabelSize(0.05);
    pTH3F->GetYaxis()->SetTitleSize(0.05);
    pTH3F->GetYaxis()->SetTitleOffset(1.75);
    pTH3F->GetYaxis()->SetNdivisions(5);
    pTH3F->GetZaxis()->SetTitle("w");
    pTH3F->GetZaxis()->CenterTitle();
    pTH3F->GetZaxis()->SetLabelSize(0.05);
    pTH3F->GetZaxis()->SetTitleSize(0.05);
    pTH3F->GetZaxis()->SetTitleOffset(1.5);
    pTH3F->GetZaxis()->SetNdivisions(5);
    pTH3F->Draw();

    Graph2D->SetMarkerStyle(20);
    Graph2D->SetMinimum(0.75);
    Graph2D->SetMaximum(1.25);
    Graph2D->Draw("surf1 same");

    Graph2DA->SetMarkerStyle(20);
    Graph2DA->SetMarkerColor(kBlack);
    Graph2DA->SetMinimum(0.75);
    Graph2DA->SetMaximum(1.25);
    Graph2DA->Draw("p same");

    pTCanvas->SaveAs(name + ".pdf");
}
开发者ID:StevenGreen1,项目名称:Thesis,代码行数:48,代码来源:MakeAwesomePlotsInter.C

示例13: pMenu

TCanvas* pMenu(std::string what)
{
  TCanvas* c = new TCanvas(("cMenu"+what).c_str(),("cMenu"+what).c_str(),1500,400); 
  c->SetBottomMargin(0.6);
  c->SetLeftMargin(0.04);
  c->SetRightMargin(0.01);
  TH1D* h = (TH1D*)gROOT->FindObject(("hMenuAlgos"+what).c_str());
  h->SetLineColor(4);
  h->SetFillColor(4);
  h->SetFillStyle(3003);
  h->LabelsOption("v");
  h->GetYaxis()->SetLabelOffset(0.005);
//  h->GetXaxis()->SetRange(550,680);
  h->DrawCopy();
  return c;
}
开发者ID:konec,项目名称:usercode-L1RpcTriggerAnalysis,代码行数:16,代码来源:plotsMenu.C

示例14: showHistogram1d

void showHistogram1d(TH1* histogram, 
		     const std::string& xAxisTitle,
		     Float_t* genX, 
		     const std::string& outputFileName)
{
  TCanvas* canvas = new TCanvas("canvas", "canvas", 800, 600);
  canvas->SetFillColor(10);
  canvas->SetBorderSize(2);

  canvas->SetTopMargin(0.10);
  canvas->SetLeftMargin(0.16);
  canvas->SetRightMargin(0.14);
  canvas->SetBottomMargin(0.12);

  TAxis* xAxis = histogram->GetXaxis();
  xAxis->SetTitle(xAxisTitle.data());
  xAxis->SetTitleOffset(1.15);

  TAxis* yAxis = histogram->GetYaxis();
  yAxis->SetTitle("Sampling Points");
  yAxis->SetTitleOffset(1.60);

  histogram->SetLineColor(1);
  histogram->SetLineWidth(2);
  histogram->SetMarkerColor(1);
  histogram->SetMarkerStyle(20);
  histogram->Draw("e1p");

  TMarker* genMarker = 0;
  if ( genX ) {
    genMarker = new TMarker(*genX, 0.10, 34);
    genMarker->SetMarkerColor(1);
    genMarker->SetMarkerSize(2);
    genMarker->Draw();
  }

  canvas->Update();
  size_t idx = outputFileName.find_last_of('.');
  std::string outputFileName_plot = std::string(outputFileName, 0, idx);
  if ( idx != std::string::npos ) canvas->Print(std::string(outputFileName_plot).append(std::string(outputFileName, idx)).data());
  canvas->Print(std::string(outputFileName_plot).append(".png").data());
  canvas->Print(std::string(outputFileName_plot).append(".pdf").data());
  canvas->Print(std::string(outputFileName_plot).append(".root").data());

  delete genMarker;
  delete canvas;  
}
开发者ID:veelken,项目名称:SVfitDevelopment,代码行数:47,代码来源:plotMarkovChainMonitorTree.C

示例15: setCanvasOptions

void setCanvasOptions(TCanvas& canvas)
{
  canvas.SetWindowSize(610,630);
  canvas.SetFillStyle(0);
  canvas.SetFillColor(0);
  canvas.SetGrid();
  canvas.SetBorderMode(0);
  canvas.SetFrameBorderMode(0);
  canvas.SetFrameBorderSize(1);
  canvas.SetFrameFillColor(0);
  canvas.SetFrameFillStyle(0);
  canvas.SetFrameLineColor(1);
  canvas.SetFrameLineStyle(1);
  canvas.SetFrameLineWidth(1);
  canvas.SetTopMargin(0.05);
  canvas.SetBottomMargin(0.13);
  canvas.SetLeftMargin(0.13);
  canvas.SetRightMargin(0.05);
  canvas.SetTickx(1);
  canvas.SetTicky(1);
  TH1F* frame = canvas.DrawFrame(0.0, 0.0, 5.0, 1.0);
  frame->GetXaxis()->SetTitle("#DeltaR_{tag-probe}");
  frame->GetYaxis()->SetTitle("Unit-normalized events per 0.1");
  frame->GetXaxis()->SetTitleColor(1);
  frame->GetYaxis()->SetTitleColor(1);
  frame->GetXaxis()->SetTitleFont(42);
  frame->GetYaxis()->SetTitleFont(42);
  frame->GetXaxis()->SetTitleSize(0.06);
  frame->GetYaxis()->SetTitleSize(0.06);
  frame->GetXaxis()->SetTitleOffset(0.9);
  frame->GetYaxis()->SetTitleOffset(1.05);
  frame->GetXaxis()->SetLabelColor(1);
  frame->GetYaxis()->SetLabelColor(1);
  frame->GetXaxis()->SetLabelFont(42);
  frame->GetYaxis()->SetLabelFont(42);
  frame->GetXaxis()->SetLabelSize(0.05);
  frame->GetXaxis()->SetLabelOffset(0.007);
  frame->GetYaxis()->SetLabelOffset(0.007);
  frame->GetXaxis()->SetAxisColor(1);
  frame->GetYaxis()->SetAxisColor(1);
  frame->GetXaxis()->SetDecimals(kTRUE);
  frame->GetYaxis()->SetDecimals(kTRUE);
  frame->GetXaxis()->SetTickLength(0.03);
  frame->GetYaxis()->SetTickLength(0.03);
  frame->GetXaxis()->SetNdivisions(510);
  frame->GetYaxis()->SetNdivisions(510);
}
开发者ID:rpyohay,项目名称:physics-tools,代码行数:47,代码来源:KinematicAnalysis.C


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