#' Ploting your activity.
#'
#' @import ggplot2
#' @param df data frame.
indicate_yr_activity <- function (df) {
df$Day %<>% factor(levels = c("Sat", "Fri", "Thu", "Wed", "Tue", "Mon", "Sun"))
ggplot(df,
aes(x = Week, y = Day,
fill = factor(Class))) +
geom_tile(color = "white", size = 1) +
scale_fill_manual(values = c("#eeeeee", "#d6e685", "#8cc665", "#44a340", "#1e6823")) +
coord_fixed(ratio = 8 / 10) +
theme(legend.position = "none",
panel.grid.major = element_blank(),
axis.text.x = element_text(angle = 45, hjust = 1))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.