Git Product home page Git Product logo

Comments (7)

teunbrand avatar teunbrand commented on May 24, 2024

Thanks for the report! This appears to be a duplicate of #5728. The summary of that issue is: we have no intention of changing this behaviour.

from ggplot2.

ltierney avatar ltierney commented on May 24, 2024

It's a pretty clear regression, something I try to avoid in software I write and maintain. But it's your software and your call.

from ggplot2.

teunbrand avatar teunbrand commented on May 24, 2024

I don't think of it as a regression but as trade-off that trades the complex problem of having to tailor guide_legend(override.aes) for the mild inconvenience of having to put show.legend = TRUE.

from ggplot2.

ltierney avatar ltierney commented on May 24, 2024

When existing working code no longer works correctly after a change that is, by definition, a regression. Something we try pretty hard to avoid in maintaining R β€” not that we always succeed.

Thanks for the show.legend = TRUE hint; putting that in the right places works for me. I'm glad you told me since there is no way I can see I could have figured out from the documentation of show.legend in ?geom_polygon or ?geom_sf that that would give me what I needed.

from ggplot2.

teunbrand avatar teunbrand commented on May 24, 2024

When existing working code no longer works correctly after a change

Argueably, the code was working incorrectly before by showing legend keys that weren't present in the data. I get that this might be intended, but this intent has to be explicit now.

there is no way I can see I could have figured out from the documentation

As mentioned in #5728, it was displayed in the changelog, described in the release blog and we've since included it in the documentation of the drop argument.

from ggplot2.

ltierney avatar ltierney commented on May 24, 2024

When existing working code no longer works correctly after a change

Argueably, the code was working incorrectly before by showing legend keys that weren't present in the data. I get that this might be intended, but this intent has to be explicit now.''

We sometimes try to make that argument as well; doesn't usually work very well for us either :-).

there is no way I can see I could have figured out from the documentation

As mentioned in #5728, it was displayed in the changelog, described in the release blog and we've since included it in the documentation of the drop argument.

That looks good. might be worth having a cross-reference from the show.legend docs as well.

The current behavior with just drop = FALSE still seems very odd to me. The guide does include all labels, just not all colors. It may make sense with the internal design, but still seems odd.

In any case I think we've both spent enough time on this.

from ggplot2.

teunbrand avatar teunbrand commented on May 24, 2024

That looks good. might be worth having a cross-reference from the show.legend docs as well.

Thanks for this suggestion, I'll reopen to remind us to document this.

from ggplot2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.