Open FionaKunz opened 2 years ago
@FionaKunz This is a bit tricky as one needs to modify the order of a factor.
I've added support for this in #102, you can try installing the branch to use it.
library(mlr3)
library(mlr3viz)
tasks <- tsks(c("pima", "sonar"))
learner <- lrns(c("classif.featureless", "classif.rpart"),
predict_type = "prob"
)
resampling <- rsmps("cv")
lgr::get_logger("mlr3")$set_threshold("error")
bmr <- benchmark(benchmark_grid(tasks, learner, resampling))
autoplot(bmr, measure = msr("classif.auc"), custom_facet_order = c("pima", "sonar"))
autoplot(bmr, measure = msr("classif.auc"), custom_facet_order = c("sonar", "pima"))
Created on 2022-05-30 by the reprex package (v2.0.1)
Hi!
Plotting my benchmark results, I would like to change the order of the boxplots from alphabetical order (default in autoplot function?) to another order. So far, I was able to change the respective task's boxplots the following way (see code). However, since recently, changing the levels of the task_id-factor variable, only changes the order of the title, but not the respective boxplots themselves.
How can I change the order of the boxplots? Any help highly appreciated! Thanks a lot