簡體   English   中英

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)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM