Maraca Plots - Themes and Styling

Monika Huhn


In order to give the user more options in styling their plot, we have added a theme argument to the plotting functions. This vignette gives an overview over the different options.

Let us first read in some data and prepare for plotting:



maraca_dat <- maraca(
  data = hce_scenario_a,
  step_outcomes = c("Outcome I", "Outcome II", "Outcome III", "Outcome IV"),
  last_outcome = "Continuous outcome",
  fixed_followup_days = 3 * 365,
  column_names = c(outcome = "GROUP", arm = "TRTP", value = "AVAL0"),
  arm_levels = c(active = "Active", control = "Control"),
  compute_win_odds = TRUE

Default themes

By default, the plotting functions are using a theme called “maraca”. It is implicitly called so you do not have to specify the argument theme = "maraca".


The default maraca theme adds an x- and y-axis label and angels the x-axis text for better readability. It also uses the theme “bw” of the ggplot2 package. The plot colors are not styled in the default maraca theme. We include 2 different color themes by default for the users convenience, theme = "color1" and theme = "color2".

plot(maraca_dat, theme = "color1")

plot(maraca_dat, theme = "color2")

We kept the previous default styling of the maraca package as its own theme, theme = "maraca_old"

plot(maraca_dat, theme = "maraca_old")

If you want to completely style your code by yourself, remove any of the extra styling with theme = "none".

plot(maraca_dat, theme = "none")