
Last chance! 50% off unlimited learning
Sale ends in
Creates a ggplot that makes a smooth rank over time. To change the `smooth` argument you need to put it outside of the `aes` of the geom. Uses the x, xend, y and yend aestethics. Make sure each sigmoid curve is its own group.
geom_sigmoid
Creates a ggplot that makes a smooth rank over time. To change the `smooth` argument you need to put it outside of the `aes` of the geom. Uses the x, xend, y and yend aestethics. Make sure each sigmoid curve is its own group.
geom_sigmoid(
mapping = NULL,
data = NULL,
geom = "line",
position = "identity",
na.rm = FALSE,
show.legend = NA,
smooth = 8,
direction = "x",
inherit.aes = TRUE,
...
)
provide you own mapping. both x, xend, y and yend need to be numeric.
provide you own data
xhange geom
change position
remove missing values
show legend in plot
how much smooth should the curve have? More means steeper curve.
the character x or y depending of smoothing direction
should the geom inherits aestethics
other arguments to be passed to the geom
ggplot layer
# NOT RUN {
library(ggplot2)
df <- data.frame(x = 1:6,
y = 5:10,
xend = 7,
yend = -3:2)
ggplot(df, aes(x = x, xend = xend, y = y, yend = yend, color = factor(x))) +
geom_sigmoid()
# }
Run the code above in your browser using DataLab