# dichotomous variable
cspp <- get_cspp_data(vars = c("drugs_medical_marijuana"))
plot_panel(cspp)
# change colors and years
plot_panel(cspp, colors = c("white", "blue", "black"),
years = seq(1980, 2000))
# continuous variable with missing data:
continuous_data <- get_cspp_data(vars = c("h_diffs"))
plot_panel(continuous_data, colors = c("white", "dodgerblue", "#eeeeee"))
# add ggplot2 features
library(ggplot2)
plot_panel(continuous_data, colors = c("white", "dodgerblue", "#eeeeee")) +
theme(legend.position = "none") +
ggplot2::ggtitle("Continuous variable")
Run the code above in your browser using DataLab