ROOT: Why TStyle::SetStatFontSize() doesn't work?
2013-08-28 02:33
543 查看
I need a larger statics font size, but it does't work:
Reason for this problem:
That's maybe a bug of TH class in ROOT.
Reason for this problem:
/* * ===================================================================================== * * FILENAME: SetStatFontSize.cpp * * VERSION: 1.0 * CREATED: 08/27/13 23:58:26 * LAST CHANGED: 08/28/2013 02:08:48 * AUTHOR: * ORGANIZATION: HEP group @ PKU * COMPILER: gcc * * DESCRIPTION: ROOT couldn't automatically resize the width of statics box, * so TStyle::SetStatFontSize() has no effect when the font's size is larger than * the box. Therefore, you'd better reset new width by calling TStyle::SetStatW() * whenever you call TStyle::SetStatFontSize(). Note: The height of the box can be * resize automatically. * * ===================================================================================== */ #include <TH1D.h> #include <TCanvas.h> #include <TStyle.h> void SetStatFontSize() { TH1D* h = new TH1D("h","h title",100,0,10.); h->Fill(1); TCanvas* c = new TCanvas("c","",500,500); gStyle->SetStatFontSize(0.14); //To make sure SetStatFontSize() does work, you need next statement: gStyle->SetStatW(0.7); h->Draw(); }New output with above codes:
That's maybe a bug of TH class in ROOT.
相关文章推荐
- set_terminate doesn't work
- setComponentEnabledSetting doesn't work on widget 以及副作用
- ViewPager.setOffscreenPageLimit(0) doesn't work as expected
- BitmapImage.UriSource binding doesn't work ...
- why set path doesn't work
- Attempting to start Apache service...but apache doesn't work
- 貌似csdn文章搜索doesn't work
- TLS doesn't work on PPPoE in Chelan: MTU issue
- 安装rhel5.4遇到的IO-APIC+timer doesn't work .
- Why dynamic_cast doesn't work ?
- ActionBarSherlock: changing homeAsUpIndicator doesn't work
- topmargin=\"0\" doesn\'t work in Firefox?
- adb logcat filter doesn't work
- When Element add attribute by the method "setAttribute",It can't work in IE
- Liferay color-scheme doesn't work
- eclipse插件Maven添加依赖查询无结果的解决方法(Select Dependency doesn't work)
- eclipse插件Maven添加依赖查询无结果的解决方法(Select Dependency doesn't work)
- My Backspace Key doesn't work!
- My Backspace Key doesn't work!
- window.close() doesn't work - Scripts may not close windows that were not opened by script.