Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions R/visualizer-lib-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -402,12 +402,19 @@ plot_eval_constructor <- function(eval_results = NULL, eval_names = NULL,
}
}
# add theme
plt <- plt + vthemes::theme_vmodern()
if (!is.null(color_str)) {
discrete <- !is.numeric(plt_df[[color_str]])
plt <- plt +
vthemes::scale_color_vmodern(discrete = discrete) +
vthemes::scale_fill_vmodern(discrete = discrete)
plot_theme <- getOption("simChef.plot_theme", "default")
if (!identical(plot_theme, "default")) {
if (identical(plot_theme, "vthemes")) {
plt <- plt + vthemes::theme_vmodern()
if (!is.null(color_str)) {
discrete <- !is.numeric(plt_df[[color_str]])
plt <- plt +
vthemes::scale_color_vmodern(discrete = discrete) +
vthemes::scale_fill_vmodern(discrete = discrete)
}
} else {
plt <- plt + plot_theme
}
}
# add labels
labels_ls <- purrr::map(
Expand Down
3 changes: 2 additions & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

op <- options()
op.simChef <- list(
simChef.debug = FALSE
simChef.debug = FALSE,
simChef.plot_theme = "default"
# TODO: simChef.verbosity
)
toset <- !(names(op.simChef) %in% names(op))
Expand Down
182 changes: 80 additions & 102 deletions tests/testthat/_snaps/visualizer-lib/plot-eval-constructor1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
219 changes: 98 additions & 121 deletions tests/testthat/_snaps/visualizer-lib/plot-eval-constructor2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
125 changes: 58 additions & 67 deletions tests/testthat/_snaps/visualizer-lib/plot-feature-importance1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
125 changes: 58 additions & 67 deletions tests/testthat/_snaps/visualizer-lib/plot-feature-importance2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
551 changes: 239 additions & 312 deletions tests/testthat/_snaps/visualizer-lib/plot-feature-selection-err1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
103 changes: 46 additions & 57 deletions tests/testthat/_snaps/visualizer-lib/plot-pred-curve-pr1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
103 changes: 46 additions & 57 deletions tests/testthat/_snaps/visualizer-lib/plot-pred-curve-roc1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
104 changes: 55 additions & 49 deletions tests/testthat/_snaps/visualizer-lib/plot-pred-curve-roc2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
219 changes: 98 additions & 121 deletions tests/testthat/_snaps/visualizer-lib/plot-pred-err1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
190 changes: 84 additions & 106 deletions tests/testthat/_snaps/visualizer-lib/plot-pred-err2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
214 changes: 96 additions & 118 deletions tests/testthat/_snaps/visualizer-lib/plot-pred-err3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
230 changes: 104 additions & 126 deletions tests/testthat/_snaps/visualizer-lib/plot-pred-err4.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
207 changes: 88 additions & 119 deletions tests/testthat/_snaps/visualizer-lib/plot-reject-prob1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
104 changes: 55 additions & 49 deletions tests/testthat/_snaps/visualizer-lib/plot-reject-prob2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading