Created
April 22, 2023 17:19
-
-
Save HorridTom/43085686f27a5f50a87bb68278382317 to your computer and use it in GitHub Desktop.
Example of modifying x-axis labels on autospc plot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(lubridate) | |
library(autospc) | |
set.seed(20230422L) | |
df <- tibble(x = seq(from = as.Date("2023-01-01"), | |
to = as.Date("2023-01-31"), | |
by = 1L), | |
y = rpois(31L, lambda = 20L)) | |
my_spc_plot <- plot_auto_SPC(df, chartType = "C") | |
my_spc_plot | |
my_spc_plot + | |
scale_x_date(date_breaks = "1 week") | |
my_spc_plot + | |
scale_x_date(date_breaks = "1 week") + | |
theme(axis.text.x = element_text(angle = 90)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment