Skip to content

add stat_manual example #6553

@EvaMaeRey

Description

@EvaMaeRey

I think it would be nice to add a dplyr example that doesn't make use of the args argument like:

xyends_at_means <- function(data){data |> mutate(xend = mean(x, na.rm = T, yend = mean(y, na.rm = T)}

ggplot(mtcars) + 
aes(x = wt, mpg,
color = factor(cyl)) + 
geom_point() + 
stat_manual(geom = "segment", 
                      fun =  xyends_at_means)

Or replace one of the existing examples - I think there are 2 examples that both use dplyr + args+vars.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions