0

我不是 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)

输出似乎相同,标题大小没有变化......

4

1 回答 1

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)
于 2012-10-31T04:10:43.983 回答