GG_lines: Plot lines with labels

GG_linesR Documentation

Plot lines with labels

Description

Plot lines with labels

Usage

GG_lines(data, x, y, color, right_margin = 100, points = T)

Arguments

data

A data frame with x, y, and color variables

x

A string with the x variable name

y

A string with the y variable name

color

A string with the color variable name

right_margin

Right margin for the plot. Default is 100.

points

Whether to add points to the plot. Default is TRUE.

Value

A ggplot2 object

Examples

tidyr::population %>%
filter(country %in% (.env$population$country %>% unique() %>% str_subset(pattern = "^A") %>% head(10))) %>%
GG_lines("year", "population", "country") +
scale_y_log10()

Deleetdk/kirkegaard documentation built on June 8, 2025, 4:09 a.m.