Skip to contents

Adjust description

Usage

adjust_description(
  plot,
  title = ggplot2::waiver(),
  x_axis_title = ggplot2::waiver(),
  y_axis_title = ggplot2::waiver(),
  legend_title = ggplot2::waiver(),
  caption = ggplot2::waiver(),
  ...
)

Arguments

plot

A tidyplot generated with the function tidyplot().

title

Plot title.

x_axis_title

X axis title.

y_axis_title

Y axis title.

legend_title

Legend title.

caption

Plot caption text.

...

Arguments passed on to ggplot2::labs().

Value

A tidyplot object

Details

Examples

# Plot without adjustments
study %>%
  tidyplot(x = treatment, y = score, color = treatment) %>%
  add_data_points() %>%
  add_mean_bar(alpha = 0.4) %>%
  add_sem_errorbar()


# Adjust description
study %>%
  tidyplot(x = treatment, y = score, color = treatment) %>%
  add_data_points() %>%
  add_mean_bar(alpha = 0.4) %>%
  add_sem_errorbar() %>%
  adjust_description(
    title = "This is my fantastic plot title",
    x_axis_title = "Treatment group",
    y_axis_title = "Disease score",
    legend_title = "Legend title",
    caption = "Here goes the caption")


# Plotmath expressions
study %>%
  tidyplot(x = treatment, y = score, color = treatment) %>%
  add_data_points() %>%
  add_mean_bar(alpha = 0.4) %>%
  add_sem_errorbar() %>%
  adjust_description(
    title = "$H[2]*O$",
    x_axis_title = "$H[2]*O$",
    y_axis_title = "$H[2]*O$",
    legend_title = "$H[2]*O$",
    caption = "$H[2]*O$")