【问题标题】:R - change size of axis labels with ROCRR - 使用 ROCR 更改轴标签的大小
【发布时间】:2015-03-10 15:21:47
【问题描述】:


我想增加轴标签的大小。数据包含 ROC 曲线,由ROCR 绘制。

library(ROCR)
# load the sample data and create an performance object
data(ROCR.hiv)
pp <- ROCR.hiv$hiv.svm$predictions
ll <- ROCR.hiv$hiv.svm$labels
par(mfrow=c(2,2)) 
pred<- prediction(pp, ll)
perf <- performance(pred, measure="tpr", x.measure = "fpr")

对图形的某些操作有效,其他操作,例如设置cex.axis,则无效。这是一个例子:

# try different manipulations
plot(perf) # normal layout
plot(perf, cex.axis=2) # no change 
plot(perf, col.axis="red") # no change 
plot(perf, col.main="red", cex.main=3, main="abc") # the header may be manipulated

似乎cex.axis 设置不正确,因为

plot(perf, cex.axis=2) 
par()

显示,那

$cex.axis
[1] 1

有什么想法吗? 谢谢!

【问题讨论】:

  • plot(perf, cex.lab = 2) ?
  • 参见?plot.performance 下的...,其中还有一个很长的示例“娱乐您的孩子”
  • @bergant 这会改变轴标签的大小。这个设置不会被忽略,这很好,但很遗憾这不是我想要的。
  • @rawr:谢谢你的提示,我在那里找到了解决方案!

标签: r plot axis-labels


【解决方案1】:

感谢 rawr 我找到了答案:

par(cex.axis=2)
plot(perf)

【讨论】:

    猜你喜欢
    • 2011-07-18
    • 1970-01-01
    • 2022-09-28
    • 2016-04-25
    • 2018-07-20
    • 2013-02-03
    • 1970-01-01
    • 2014-02-19
    • 1970-01-01
    相关资源
    最近更新 更多