line_graph | R Documentation |
This function takes in data and produces a line graph of "yvar" along the "xvar" axis, categorized by "catvar" and facetted by "facet_label" if specified.
line_graph(
dat,
colors = NULL,
size = 0.5,
facet = F,
label_names = NULL,
limits = NULL,
y_type = scales::percent_format(accuracy = 1),
line_type = NULL,
title = NULL,
y_title = NULL,
caption = NULL
)
dat |
Data with a columns containing variable of interest ("yvar"), x-axis variable ("xvar"), and grouping variable ("catvar"). |
colors |
Colors for "catvar." NULL (default) returns R's automatic coloring. |
size |
Line width. Defaults to 0.5. |
facet |
T to use "facet_label" column to create facetting panels. F (default) does not need "facet_label" column. |
label_names |
Vector of label names to display for each facet. |
limits |
Y-axis limits. NULL (default) returns R's automatic limits. |
y_type |
Data format of "yvar". Default returns percent to nearest unit value. |
line_type |
Line types for "catvar." NULL (default) returns R's automatic solid lines. |
title |
Plot title. NULL (default) returns no title. |
y_title |
Title to display along y-axis. NULL (default) returns no title. |
caption |
Caption for figure. NULL (default) returns no caption. |
Line graph of "yvar" over "xvar", categorized by "catvar" and facetted by "facet_label" if specified., formatted per lab style.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.