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


C++ TPaveLabel::DrawPaveLabel方法代码示例

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


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

示例1: showjets

//----------------------------------------------------------------------
/// show the jets contained in filename (as produced by
/// ClusterSequence::print_jets_for_root()), with an optional label
TCanvas * showjets (const char * filename, const char * label = 0) {

  // display the various 2-d drawing options
  gROOT->Reset();

  // set up canvas
  TCanvas * lego = new TCanvas("lego","lego options",400,50,800,600);
  lego->SetTheta(30.0);
  lego->SetPhi(20.0);

  // orientation used for plots in subtraction paper
  //lego->SetTheta(62.15);
  //lego->SetPhi(9.15);

  ////vector<double> col 

  set_default_colours(lego);

  TPaveLabel pl;
   
  JetHist * jets = new JetHist(filename);
  jets->stack.Draw("lego1"); // cyl does not work with 5.16
  if (label != 0) {
    Float_t x1=0.63, y1=0.875, x2=0.95, y2=0.925;
    pl.DrawPaveLabel(x1,y1,x2,y2,label,"brNDC");
  } else if (jets->comment() != "") {
    Float_t x1=0.15, y1=0.875, x2=0.95, y2=0.925;
    pl.DrawPaveLabel(x1,y1,x2,y2,jets->comment().c_str(),"brNDC");
  }

  // normal histogram labels not working, so draw them by hand
  TLatex l;
  l.SetTextAlign(22);
  l.SetTextSize(0.05);
  //l.DrawLatex(0.0,0.85,"anti-k_{t}, R=1");

  l.SetTextSize(0.04);
  l.DrawLatex(0.20,-0.98,"y");
  l.SetTextAlign(32);
  l.DrawLatex(-0.7,0.8,"p_{t} [GeV]");
  l.DrawLatex(-0.6,-0.78,"#phi");

  // do not delete jets -- otherwise you lose everything!;

  return lego;
  ///
  lego->Update();
}
开发者ID:Dr15Jones,项目名称:fastjet,代码行数:51,代码来源:jet-plots.C


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