Skip to content
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

geom_abline ... parameter documentation includes size in the example #5225

Closed
jmuhlenkamp opened this issue Mar 10, 2023 · 1 comment
Closed

Comments

@jmuhlenkamp
Copy link

This is relatively minor, but hopefully an easy fix for someone quite familiar with the package internals. This is in the version 3.4.1 and I see it in the source code still, too.

?geom_abline

includes

... Other arguments passed on to layer(). These are often aesthetics, used to set an aesthetic to a fixed value, like colour = "red" or size = 3. They may also be parameters to the paired geom/stat.

This could potentially frustrate end users who would get a warning from following this example

library(ggplot2); ggplot(mtcars, aes(wt, mpg)) + geom_point() + geom_abline(slope = 10, size = 3)
# > ggplot(mtcars, aes(wt, mpg)) + geom_point() + geom_abline(slope = 10, size = 3)
# Warning message:
# Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
# ℹ Please use `linewidth` instead.
# This warning is displayed once every 8 hours.
# Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated. 

I believe the misleading ... documentation is coming from:

I was going to submit a fix for this, but realized the inherits here make it a bit more nuanced (see below). Happy to submit a PR for this if given some guidance about the best way to resolve it.

@teunbrand
Copy link
Collaborator

teunbrand commented Mar 14, 2023

Thanks for the report! The issue is already being tracked in #5040, so it would be best to keep al the discussion in one place over there. The PR #5127 aims to address this (and other) point(s).

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

No branches or pull requests

2 participants