Skip to content

Commit 6e3ac81

Browse files
authored
Correct doc for print.ggplot, returns 'x' not 'data' (#4390) (#4657)
1 parent c856b7f commit 6e3ac81

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# ggplot2 (development version)
22

3+
* Updated documentation for `print.ggplot` to reflect that it returns
4+
the original plot, not the result of `ggplot_build()`. (@r2evans, #4390)
5+
36
* `scale_*_manual()` no longer displays extra legend keys, or changes their
47
order, when a named `values` argument has more items than the data. To display
58
all `values` on the legend instead, use

R/plot.r

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,7 @@ is.ggplot <- function(x) inherits(x, "ggplot")
137137
#' @param vp viewport to draw plot in
138138
#' @param ... other arguments not used by this method
139139
#' @keywords hplot
140-
#' @return Invisibly returns the result of [ggplot_build()], which
141-
#' is a list with components that contain the plot itself, the data,
142-
#' information about the scales, panels etc.
140+
#' @return Invisibly returns the original plot.
143141
#' @export
144142
#' @method print ggplot
145143
#' @examples

man/print.ggplot.Rd

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)