powered by
Creates line plots.
line_plot( data, x, y = "1", group = NULL, facet_x = NULL, facet_y = NULL, yoy = FALSE, size_line = 1, points = FALSE, size = 11, reorder = c("group", "facet_x", "facet_y"), palette = ez_col, labels_y = ez_labels, limits_y = c(NA, NA), use_theme = theme_ez, facet_scales = "fixed", na.rm = FALSE, legend_ncol = NULL )
A ggplot object.
A data.frame.
A named character value. Evaluates to a column.
A character value. Evaluates to a column.
A character. Evaluates to a column.
Logical used to indicate whether a YOY grouping should be created. Default is FALSE.
FALSE
width of line for geom_line(). Default is 1.
geom_line()
logical. Option to include points
theme size for use_theme(). Default is 14.
use_theme()
A character vector specifying the group variables to reorder. Default is c("group", "facet_x", "facet_y").
c("group", "facet_x", "facet_y")
Colour function.
label formatting function
vector of c(min, max) y-axis limits
ggplot theme function
Option passed to scales argument in facet_wrap or facet_grid. Default is "fixed".
facet_wrap
facet_grid
"fixed"
logical. Option to exclude NAs
Number of columns in legend.
suppressPackageStartupMessages(library(tsibble)) library(tsibbledata) line_plot(pelt, "Year", c("Hare", "Lynx"), points = TRUE, limits_y = c(0, NA))
Run the code above in your browser using DataLab