Skip to content

Commit

Permalink
fix plot modify in place
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunuuuu committed Dec 24, 2024
1 parent 46a7240 commit 56178f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/layout-quad-add.R
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ quad_body_add <- function(object, quad, object_name) {
#' @importFrom ggplot2 ggplot_add
#' @export
quad_body_add.default <- function(object, quad, object_name) {
quad@plot <- ggplot_add(object, quad@plot, object_name)
quad@plot <- ggplot_add(object, ggfun("plot_clone")(quad@plot), object_name)
quad
}

Expand Down
2 changes: 1 addition & 1 deletion R/plot-.R
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ plot_add <- function(object, plot, object_name) {
#' @importFrom ggplot2 ggplot_add
#' @export
plot_add.default <- function(object, plot, object_name) {
plot@plot <- ggplot_add(object, plot@plot, object_name)
plot@plot <- ggplot_add(object, ggfun("plot_clone")(plot@plot), object_name)
plot
}

Expand Down

0 comments on commit 56178f6

Please sign in to comment.