gaospecial / ggVennDiagram

A 'ggplot2' implement of Venn Diagram.
https://gaospecial.github.io/ggVennDiagram/
GNU General Public License v3.0
284 stars 38 forks source link

Edit README to reflect updated geom_line aesthetics #48

Closed helmingstay closed 10 months ago

helmingstay commented 1 year ago

Minor update to docs - the aesthetics arguments of ggplot::geom_line have changed

From the customization example in README.html:

Now we can customize this figure.

ggplot() +
  geom_sf(aes(fill=count), data = venn_region(data)) +
  geom_sf(size = 2, lty = "dashed", color = "grey", data = venn_setedge(data), show.legend = F) +

I believe the last line should read:

geom_sf(linewidth = 2, linetype = "dashed", ...) +

When used in ggplot2, geom_line(size=2) returns the following warning:

Warning message:
Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
Please use `linewidth` instead.

When I use geom_sf(size=2), I don't get a warning, but there's no affect on the plot. However, geom_sf(linewidth=2) works as expected.

Note that geom_sf(lty='dashed') does works as expected, but lty isn't documented in ggplot2. It might improve clarity a bit to use linetype instead?

gaospecial commented 1 year ago

Thanks for your comment. Do you interested in fixing this issue by yourself by opening a pull request ?