Description Usage Arguments Value Examples
Adjust axis tick marks and labels
1 |
data |
= input dataframe |
var |
= variable of interest e.g., year |
to |
= step increase desired e.g., every 5 years |
start |
= adjust the start value |
end |
= adjust the end vlaue |
min |
= lowest value to label |
tickr
1 2 3 4 5 6 7 8 9 10 11 | data.frame(year = 1970:2019,
catch = rnorm(50, 10, 2)) -> df
xaxis <- tickr(df, year, 10)
df %>%
ggplot(aes(year, catch)) +
geom_point() +
scale_x_continuous(labels = xaxis$labels, breaks = xaxis$breaks)
theme_set(theme_report(base_size = 12, base_family = "Bookman"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.