Skip to content

make legend detection code more robust. #3964

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 4 commits into from
Apr 27, 2020

Conversation

clauswilke
Copy link
Member

Fixes #3963.

library(ggplot2)

nc <- sf::read_sf(system.file("shape/nc.shp", package="sf"))
nc$BIR74_bin <- cut_number(nc$BIR74, 3)
nc_tibble <- tibble::as_tibble(nc)

ggplot(nc_tibble) +
  geom_sf(aes(geometry = geometry, fill = BIR74_bin))

Created on 2020-04-26 by the reprex package (v0.3.0)

@yutannihilation
Copy link
Member

yutannihilation commented Apr 26, 2020

For GitHub CI failures:

  • I don't know what happens on Windows runner, but I bet it's just not ready for R 4.0.
  • For Linux, something goes wrong but I have no idea... (AFAIK, libcurl4-gnutls-dev conflicts with libcurl4-openssl-dev, but why does this conflict arises at this timing...?)
The following packages have unmet dependencies:
 libgit2-dev : Depends: libcurl4-gnutls-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Anyway, either of these is our fault, so you can just ignore the failures for now.

Copy link
Member

@yutannihilation yutannihilation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Could you add a NEWS item?

@clauswilke
Copy link
Member Author

What exactly do you think the NEWS item should say? Just something like "fixed a bug in autodetection of legend type for geom_sf()?" Or "In geom_sf(), the legend type is now detected from the mapped geometry column."?

@yutannihilation
Copy link
Member

Since this is more of a bug fix, the former sounds appropriate to me.

@clauswilke clauswilke merged commit 296eecb into tidyverse:master Apr 27, 2020
@clauswilke clauswilke deleted the issue-3963-geom_sf branch April 27, 2020 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

default_aesthetics in geom_sf does not handle NULL properly
2 participants