line_plot {ezplot} | R Documentation |
line_plot
Description
Creates line plots.
Usage
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
)
Arguments
data |
A data.frame. |
x |
A named character value. Evaluates to a column. |
y |
A named character value. Evaluates to a column. |
group |
A character value. Evaluates to a column. |
facet_x |
A character value. Evaluates to a column. |
facet_y |
A character. Evaluates to a column. |
yoy |
Logical used to indicate whether a YOY grouping should be created.
Default is |
size_line |
width of line for |
points |
logical. Option to include points |
size |
theme size for |
reorder |
A character vector specifying the group variables to reorder.
Default is |
palette |
Colour function. |
labels_y |
label formatting function |
limits_y |
vector of c(min, max) y-axis limits |
use_theme |
ggplot theme function |
facet_scales |
Option passed to scales argument in |
na.rm |
logical. Option to exclude NAs |
legend_ncol |
Number of columns in legend. |
Value
A ggplot object.
Examples
suppressPackageStartupMessages(library(tsibble))
library(tsibbledata)
line_plot(pelt, "Year", c("Hare", "Lynx"), points = TRUE, limits_y = c(0, NA))