Skip to content

Alpha affects line geom_sf() - #3608

Merged
yutannihilation merged 5 commits into
tidyverse:masterfrom
yutannihilation:fix/issue-3589-geom-sf-line-alpha
Nov 6, 2019
Merged

yutannihilation merged 5 commits into
tidyverse:masterfrom
yutannihilation:fix/issue-3589-geom-sf-line-alpha

Conversation

@yutannihilation

Copy link
Copy Markdown
Member

Fix #3589

library(ggplot2)
library(sf)
#> Linking to GEOS 3.7.2, GDAL 3.0.1, PROJ 6.2.0

d <- data.frame(x = 1:5, y = 1:5)

l <- st_linestring(as.matrix(d))
sf <- st_sf(geometry = st_sfc(l))

p1 <- ggplot(d, aes(x, y)) + geom_line(alpha = 0.1) + ggtitle("geom_line()")
p2 <- ggplot(sf) + geom_sf(alpha = 0.1) + ggtitle("geom_sf()")

patchwork::wrap_plots(p1, p2)

Created on 2019-11-04 by the reprex package (v0.3.0)

Comment thread NEWS.md Outdated

* Increase the default `nbin` of `guide_colourbar()` to place the ticks more precisely (#3508, @yutannihilation).

* `geom_sf()` no more ignores alpha on linestring geometry (#3589, @yutannihilation).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe write in a positive way: "geom_sf() now applies alpha to linestring geometries ..."?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks, it sounds better.

@yutannihilation
yutannihilation merged commit ebf88ca into tidyverse:master Nov 6, 2019
@yutannihilation
yutannihilation deleted the fix/issue-3589-geom-sf-line-alpha branch November 6, 2019 01:15
@lock

lock Bot commented May 5, 2020

Copy link
Copy Markdown

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock Bot locked and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

alpha should work on line geom_sf()

2 participants