Skip to content

Commit

Permalink
change default in export_visualizer from pdf to png
Browse files Browse the repository at this point in the history
* change default in export_visualizer from pdf to png to accomodate viz_cache = ".png" in render_docs()
* cannot easily embed pdfs in Rmd
  • Loading branch information
tiffanymtang committed Jan 2, 2025
1 parent 79e9941 commit e838a77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions R/experiment.R
Original file line number Diff line number Diff line change
Expand Up @@ -2005,7 +2005,7 @@ Experiment <- R6::R6Class(
#' @param ... Additional arguments to pass to [ggplot2::ggsave()].
#'
#' @return The `Experiment` object, invisibly.
export_visualizers = function(device = "pdf", width = "auto", height = "auto",
export_visualizers = function(device = "png", width = "auto", height = "auto",
...) {
rlang::check_installed("ggplot2",
reason = "to export visualizers to image.")
Expand All @@ -2020,7 +2020,6 @@ Experiment <- R6::R6Class(
} else {
save_dir <- private$.get_vary_across_dir()
}
save_dir <- file.path(save_dir, "viz_results")
if (!dir.exists(save_dir)) {
dir.create(save_dir, recursive = TRUE)
}
Expand Down
2 changes: 1 addition & 1 deletion man/Experiment.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e838a77

Please sign in to comment.