本文整理汇总了C++中TVirtualPad::GetBottomMargin方法的典型用法代码示例。如果您正苦于以下问题:C++ TVirtualPad::GetBottomMargin方法的具体用法?C++ TVirtualPad::GetBottomMargin怎么用?C++ TVirtualPad::GetBottomMargin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TVirtualPad
的用法示例。
在下文中一共展示了TVirtualPad::GetBottomMargin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: splithist
void splithist(double ratio=0.2){
TVirtualPad* pmain = TVirtualPad::Pad();
double h = 1. - pmain->GetTopMargin() - pmain->GetBottomMargin();
double xlow = 0.; //gStyle->GetPadLeftMargin();
double xhigh = 1.; // - gStyle->GetPadRightMargin();
double ytop = 1.; //- gStyle->GetPadTopMargin();
double ybot = 0.; //gStyle->GetPadBottomMargin();
double ymid = pmain->GetBottomMargin() + ratio * h; //ybot + ratio * (ytop-ybot);
double yp1bot = ymid;
double yp2top = ymid;
TPad* p1 = new TPad(TString(pmain->GetName()) + "_1", pmain->GetTitle(),
xlow, yp1bot, xhigh, ytop);
p1->SetNumber(1);
TPad* p2 = new TPad(TString(pmain->GetName()) + "_2", pmain->GetTitle(),
xlow, ybot, xhigh, yp2top);
p2->SetNumber(2);
p1->SetFillStyle(4000);
p2->SetFillStyle(4000);
double p1h = ytop - yp1bot;
double p2h = yp2top - ybot;
/*
p1->SetTopMargin(pmain->GetTopMargin()/p1h);
p1->SetBottomMargin((ymid-yp1bot)/p1h);
p1->SetLeftMargin(pmain->GetLeftMargin());
p1->SetRightMargin(pmain->GetRightMargin());
p2->SetTopMargin((ymid-yp2top)/p2h);
p2->SetBottomMargin(pmain->GetBottomMargin()/p2h);
p2->SetLeftMargin(pmain->GetLeftMargin());
p2->SetRightMargin(pmain->GetRightMargin());
*/
p1->SetTopMargin(0.11);
p1->SetBottomMargin(0.);
p1->SetRightMargin(0.02);
p2->SetTopMargin(0.);
p2->SetBottomMargin(0.3);
p2->SetRightMargin(0.02);
p2->Draw();
p1->Draw();
pmain->Modified();
p1->cd();
}