Skip to content

geom_function does not produce a x axis title where no data is added #5647

@davidhodge931

Description

@davidhodge931
library(tidyverse)

p <- ggplot() +
  geom_function(
    fun = \(x) dnorm(x),
  )

#currently produces this
p

#I think it should produce this
p +
  labs(x = "x")

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions