
Clean theme for ggkodom linear and heatmap plots
theme_kodom.RdBased on ggplot2::theme_minimal(): vertical x-axis grid lines mark time
positions, horizontal y-axis grid lines are suppressed (they would bisect
subject lanes and add clutter). Restrained axis text, wide horizontal
color-bar legend. Suitable for geom_kodom_line() and
geom_kodom_heatmap().
Value
A ggplot2::theme() object.
Details
The vertical grid lines can be suppressed or restyled via the usual ggplot2
theme() override:
+ theme(panel.grid.major.x = element_blank())Examples
# \donttest{
library(ggplot2)
df <- data.frame(
subject_id = rep(1:5, each = 4),
time = rep(1:4, 5),
visit_month = rep(1:4, 5),
value = rep(1:4, 5),
hba1c = rep(1:4, 5),
arm = rep(c("Treatment", "Control"), c(12, 8))
)
ggplot(df, aes(x = time, id = subject_id, colour = value)) +
geom_kodom_line() +
scale_colour_kodom() +
theme_kodom()
# }