0

I have two ROC curves are plotted in one plot. How can I convert the plot to a square plot ? And how can I give the first curve a green colour and the second curve a red colour? Here is a producible example:

par(mar=c(5,4,4,2)+0.1) 
library(ROCR)
data(ROCR.simple)
pred <- prediction( ROCR.simple$predictions, ROCR.simple$labels )
pred2 <- prediction(abs(ROCR.simple$predictions + 
                        rnorm(length(ROCR.simple$predictions), 0, 0.1)), 
                ROCR.simple$labels)
perf <- performance(pred, "tpr", "fpr" )
perf2 <- performance(pred2, "tpr", "fpr")
plot(perf)
plot(perf2, add = TRUE)

Any suggestions would be appreciated. Thank you!

Axeman
  • 32,068
  • 8
  • 81
  • 94
Joe
  • 101
  • 2
  • 9

0 Answers0