Skip to content

inconsistency in print.ggplot documentation #4390

Closed
@r2evans

Description

@r2evans

?ggplot2::print.ggplot currently includes:

Value:

     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.

but the code itself is returning invisible(x), not invisible(data) (where data <- ggplot_build(x)).

If I am interpreting this correctly, then an easy fix might be from:

  1. Change the documentation from result of 'ggplot_build()' to the original plot; or
  2. Change from invisible(x) to invisible(data).

(Personally I prefer the second, but that might be a breaking change and require more changes than just one line, e.g., testing and/or notification of a future breaking change.)

I'm willing to submit a PR for this if there is interest.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions