Skip to content

qplot() with empty labels now display as <empty> #4170

Closed

Description

@cpsievert

After the recent change in #4076, qplot()s that don't generate any axis labels now display <empty>, for example:

qplot(1:10)

Screen Shot 2020-08-13 at 12 45 34 PM

Activity

  1. yutannihilation commented on Aug 13, 2020

    @yutannihilation
    Member

    Thanks, confirmed. Though we are going to deprecate qplot() (#4079), this can be fixed easily by checking if expr$x or expr$y is empty (is_missing()).

    ggplot2/R/quick-plot.r

    Lines 91 to 96 in 6d91349

    if (is.null(xlab)) {
    xlab <- as_label(exprs$x)
    }
    if (is.null(ylab)) {
    ylab <- as_label(exprs$y)
    }

  2. thomasp85 commented on Aug 31, 2020

    @thomasp85
    Member

    let us fix it still... It is going to remain in perpetuity – @yutannihilation will you provide a PR?

  3. yutannihilation commented on Aug 31, 2020

    @yutannihilation
    Member

    Sure. I might not be able to work on this soon, but I will. Feel free to ping me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions