ROOT: Why TStyle::SetStatFontSize() doesn't work?
来源:互联网 发布:linux内核启动 编辑:程序博客网 时间:2024/05/22 01:08
I need a larger statics font size, but it does't work:
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.
- ROOT: Why TStyle::SetStatFontSize() doesn't work?
- Why dynamic_cast doesn't work ?
- Why doesn't this simple RegEx work with sed?
- Why doesn't `sudo cd /var/named` work?
- MSTest doesn’t work
- set_terminate doesn't work
- vi doesn't work
- File@CompanionFile doesn't work
- Why doesn't Linux need defragmenting?
- Why doesn't Linux need defragmenting?
- Why doesn't my new Favicon display?
- Why doesn't C++ provide heterogenous containers?
- Why doesn't .bashrc run automatically?
- Why NIO doesn't use Stream
- Why Doesn't Python Have Switch/Case?
- why vue.js doesn't support templateURL
- Ant task doesn't work in Eclipse
- RequestContext.getRequestChannelId() seems doesn't work
- 多年上网觅疏7地后一野团圆(图)
- 解线性同余方程 中国剩余定理 和 非互质的中国剩余定理
- JAVA 十六进制与字符串的转换
- CentOS安装SVN server
- Android 4.3 BLE 开发samples for SDK单独下载
- ROOT: Why TStyle::SetStatFontSize() doesn't work?
- 获取TCHAR类型字符串长度
- VC++中多字节与宽字节转换
- C++对象析构后调用虚方法和普通方法的区别
- SQLite入门
- 编译tomcat及常见问题
- Shanghai 2004 Preliminary
- ubantu 安装mysql,以及mysql的启动,关闭,重启,以及远程访问设置
- 蛇形填数