Skip to content

Correct doc for print.ggplot, returns 'x' not 'data' (#4390) #4657

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# ggplot2 (development version)

* Updated documentation for `print.ggplot` to reflect that it returns
the original plot, not the result of `ggplot_build()`. (@r2evans, #4390)

* `scale_*_manual()` no longer displays extra legend keys, or changes their
order, when a named `values` argument has more items than the data. To display
all `values` on the legend instead, use
Expand Down
4 changes: 1 addition & 3 deletions R/plot.r
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,7 @@ is.ggplot <- function(x) inherits(x, "ggplot")
#' @param vp viewport to draw plot in
#' @param ... other arguments not used by this method
#' @keywords hplot
#' @return Invisibly returns the result of [ggplot_build()], which
#' is a list with components that contain the plot itself, the data,
#' information about the scales, panels etc.
#' @return Invisibly returns the original plot.
#' @export
#' @method print ggplot
#' @examples
Expand Down
4 changes: 1 addition & 3 deletions man/print.ggplot.Rd

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