R - 使用 ROCR 更改轴标签的大小
R - change size of axis labels with ROCR
我想增加轴标签的大小。数据包含 ROCR 绘制的 ROC 曲线。
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
有什么想法吗?
谢谢!
感谢 rawr 我找到了答案:
par(cex.axis=2)
plot(perf)
我想增加轴标签的大小。数据包含 ROCR 绘制的 ROC 曲线。
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
有什么想法吗? 谢谢!
感谢 rawr 我找到了答案:
par(cex.axis=2)
plot(perf)