Skip to content

Commit 23baab0

Browse files
authored
Adds return value for ggsave (#4396)
1 parent a878bdb commit 23baab0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
* Fix a bug that `after_stat()` and `after_scale()` cannot refer to aesthetics
4848
if it's specified in the plot-global mapping (@yutannihilation, #4260).
4949

50+
* `ggsave()` now returns the saved file location invisibly (#3379, @eliocamp).
51+
5052
# ggplot2 3.3.3
5153
This is a small patch release mainly intended to address changes in R and CRAN.
5254
It further changes the licensing model of ggplot2 to an MIT license.

R/save.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ ggsave <- function(filename, plot = last_plot(),
9797
}))
9898
grid.draw(plot)
9999

100-
invisible()
100+
invisible(filename)
101101
}
102102

103103
#' Parse a DPI input from the user

0 commit comments

Comments
 (0)