我不是100%确定这只是一个错误或其他问题,但是如何从charts.PerformanceSummary()
包中更改PerformanceAnalytics
输出的标题字体大小?
这是我可以重复的例子,我希望将字体大小增加到原来的6倍......
require(PerformanceAnalytics)
v <- rnorm(100,0.001,0.003)
charts.PerformanceSummary(xts(v,Sys.Date()-(100:1)),main="random title")
charts.PerformanceSummary(xts(v,Sys.Date()-(100:1)),main="random title", cex.main=6)
输出似乎相同,标题大小没有变化....
答案 0 :(得分:1)
在绘制之前设置cex.main
:
par(cex.main = 6)
charts.PerformanceSummary(xts(v,Sys.Date()-(100:1)),main="random title")
您可能尝试的另一种替代方案(但需要先进行一些测试的方法)是使用title()
函数。
# Set `main` to `""`
charts.PerformanceSummary(xts(v,Sys.Date()-(100:1)), main = "")
# You'll have to experiment with the best combination of `line` and `cex.main`
title(main="random title", line = -2, outer = TRUE, cex.main=3)