calendR change legend background/text color

I would like to change the colors of the legend elements but can't find a way to do so.

calendR(
  year = format(Sys.Date(), "%Y"),
  month = NULL,
  start_date = NULL,
  end_date = NULL,
  start = c("S", "M"),
  orientation = c("portrait", "landscape"),
  title,
  title.size = 20,
  title.col = "gray30",
  subtitle = "",
  subtitle.size = 10,
  subtitle.col = "gray30",
  text = "",
  text.pos = NULL,
  text.size = 4,
  text.col = "gray30",
  special.days = NULL,
  special.col = "gray90",
  gradient = FALSE,
  low.col = "white",
  col = "gray30",
  lwd = 0.5,
  lty = 1,
  font.family = "sans",
  font.style = "plain",
  day.size = 3,
  days.col = "gray30",
  weeknames,
  weeknames.col = "gray30",
  weeknames.size = 4.5,
  months.size = 10,
  months.col = "gray30",
  months.pos = 0.5,
  mbg.col = "white",
  legend.pos = "none",
  legend.title = "",
  bg.col = "white",
  bg.img = "",
  margin = 1,
  lunar = FALSE,
  lunar.col = "gray60",
  lunar.size = 7,
  pdf = FALSE,
  doc_name = "",
  papersize = "A4"
)

there is also that white frame around inside the img I can't change..

calendR uses {ggplot2} to produce a plot object, but the documentation doesn’t specify whether it creates an object that can be themed with ggplot themes. Try adding

+ theme_minimal()

If that doesn’t change things, it means the return object probably can’t be tweaked with themes. If it resets the background, etc., then it can, with close study of the elements of the theming system.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.