tidyverse / ggplot2

An implementation of the Grammar of Graphics in R
https://ggplot2.tidyverse.org
Other
6.5k stars 2.02k forks source link

Review `arrow.fill` argument to line geoms #5658

Closed teunbrand closed 5 months ago

teunbrand commented 9 months ago

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 commented 9 months ago

Others that come to mind: