Skip to content

Commit

Permalink
Merge branch 'main' into theme_scale
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke authored Jan 31, 2025
2 parents 59abe62 + 9fe3cc1 commit fe8ab35
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: see
Title: Model Visualisation Toolbox for 'easystats' and 'ggplot2'
Version: 0.10.0.1
Version: 0.10.0.3
Authors@R:
c(person(given = "Daniel",
family = "Lüdecke",
Expand Down
12 changes: 10 additions & 2 deletions R/plot.visualisation_recipe.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,16 @@ plot.see_visualisation_recipe <- function(x, ...) {
}
suppressWarnings(ggraph::ggraph(attributes(x)$data, layout = attributes(x)$layout) + geoms_from_list(x))
} else {
suppressWarnings(ggplot2::ggplot(data = attributes(x)$data) +
geoms_from_list(x, ...))
global_aes <- attributes(x)$global_aes
if (!is.null(global_aes) && length(global_aes)) {
global_aes <- do.call(ggplot2::aes, args = lapply(global_aes, .str_to_sym))
}
suppressWarnings(
do.call(
ggplot2::ggplot,
insight::compact_list(list(data = attributes(x)$data, mapping = global_aes))
) + geoms_from_list(x, ...)
)
}
}

Expand Down

0 comments on commit fe8ab35

Please sign in to comment.