ipa-tys / ROCR

An R package for visualizing classifier performance (Sing/Sander/Beerenwinkel/Lengauer [2005] Bioinformatics)

Home Page:http://rocr.bioinf.mpi-sb.mpg.de/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

change default for colorize.palette

tjebo opened this issue · comments

commented

Really nice package. Thanks.

the rainbow palette is suboptimal for continuous color scales. (see for example https://clauswilke.com/dataviz/color-pitfalls.html#fig:rainbow-desaturated)

I think it would be nice to not encourage people to use this palette by choosing another default palette. For example viridis::magma() (see example).

If you like that idea, I'd be happy to create a pull request. I guess this should be only a minor change. If you like it and have a specific palette in mind, please also let me know. (I like the scico package palettes a lot too)

library(ROCR)

data(ROCR.simple)
pred <- prediction(ROCR.simple$predictions, ROCR.simple$labels)
perf <- performance(pred, "tpr", "fpr")
plot(perf, colorize = TRUE, colorize.palette = viridis::magma(256))

Created on 2021-06-07 by the reprex package (v2.0.0)

Thanks for raising the issue. I get the point of this and totally agree with it, but since ROCR has a quite established user base I don't want to force on anyone.

Could you prepare a PR for the documentation sloting in your example at the appropriate place(s)?

@tjebo

Closing this for now. If you have a PR ready, please reopen or we can continue in the PR. Thanks