geom_xmax: Draw vertical line at the max of x

View source: R/max.R

geom_xmaxR Documentation

Draw vertical line at the max of x

Description

Draw vertical line at the max of x

Usage

geom_xmax(
  mapping = NULL,
  data = NULL,
  position = "identity",
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = TRUE,
  ...
)

Arguments

mapping

provide you own mapping, x is required

data

provide you own data

position

change geom

na.rm

remove missing values without warning, default is F

show.legend

show legend in plot, default is T

inherit.aes

should the geom inherits aesthetics from global, default is true

...

other arguments to be passed to the geom, see geom segment

Value

a ggplot2 layer

Examples

library(ggplot2)
ggplot(data = cars, mapping = aes(x = dist)) + geom_histogram() + geom_xmax()

EvaMaeRey/ggxmean documentation built on April 10, 2024, 6:32 p.m.