GG_lines | R Documentation |
Plot lines with labels
GG_lines(data, x, y, color, right_margin = 100, points = T)
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. |
A ggplot2 object
tidyr::population %>%
filter(country %in% (.env$population$country %>% unique() %>% str_subset(pattern = "^A") %>% head(10))) %>%
GG_lines("year", "population", "country") +
scale_y_log10()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.