Skip to content

Feature request: rlang/purrr-style anonymous functions in stat_function #3159

Closed
@dkahle

Description

@dkahle

It'd be nice to be able to specify rlang/purrr style anonymous functions in stat_function():

df <- data.frame(x = 1:10, y = (1:10)^2)
ggplot(df, aes(x, y)) + 
  geom_point() +
  stat_function(fun = ~ .x^2)

Associated pull request forthcoming.

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