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

Review arrow.fill argument to line geoms #5658

Open
teunbrand opened this issue Jan 22, 2024 · 1 comment · May be fixed by #5768
Open

Review arrow.fill argument to line geoms #5658

teunbrand opened this issue Jan 22, 2024 · 1 comment · May be fixed by #5768

Comments

@teunbrand
Copy link
Collaborator

Some line geoms, like geom_segment() and geom_curve() have an arrow.fill argument.

library(ggplot2)

names(formals(geom_segment))
#>  [1] "mapping"     "data"        "stat"        "position"    "..."        
#>  [6] "arrow"       "arrow.fill"  "lineend"     "linejoin"    "na.rm"      
#> [11] "show.legend" "inherit.aes"
names(formals(geom_curve))
#>  [1] "mapping"     "data"        "stat"        "position"    "..."        
#>  [6] "curvature"   "angle"       "ncp"         "arrow"       "arrow.fill" 
#> [11] "lineend"     "na.rm"       "show.legend" "inherit.aes"

Others, like geom_line() and geom_path() do not.

names(formals(geom_line))
#> [1] "mapping"     "data"        "stat"        "position"    "na.rm"      
#> [6] "orientation" "show.legend" "inherit.aes" "..."
names(formals(geom_path))
#>  [1] "mapping"     "data"        "stat"        "position"    "..."        
#>  [6] "lineend"     "linejoin"    "linemitre"   "arrow"       "na.rm"      
#> [11] "show.legend" "inherit.aes"

Created on 2024-01-22 with reprex v2.1.0

We should probably make this consistent across all of ggplot2.

@teunbrand
Copy link
Collaborator Author

Others that come to mind:

  • geom_function() does not have an arrow argument, but supports it anyway.
  • geom_sf() when drawing line geometries
  • element_line()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant