pROC ROC curves remove empty space

Make sure the plotting device is square and adjust the margins so that top + bottom == left + right:

library(pROC)
png("test.png", width = 480, height = 480)
par(mar = c(4, 4, 4, 4)+.1)
n = c(4, 3, 5) 
b = c(TRUE, FALSE, TRUE)
rocobj <- plot.roc(b, n, percent = TRUE, main="ROC", col="#1c61b6", add=FALSE)
dev.off()

enter image description here

Leave a Comment