powered by
Adjust axis tick marks and labels
scale_x_tickr( ..., data, var, by = 5, var_min = NULL, var_max = NULL, lab_start = NULL, lab_end = NULL )
An object that can be added to a ggplot object
ggplot
other ggplot2::scale_x_continuous inputs
A dataframe containing the variable of interest
Variable of interest (e.g., year)
Step increase desired (e.g., every 5 years)
minimum value to adjust axis range
Maximum value to adjust axis range
Lowest value to label
Last value to label
# Use with ggplot2 df <- data.frame(year = 1977:2023, value = rnorm(47)) library(ggplot2)
Run the code above in your browser using DataLab