Learn R Programming

tidyplots (version 0.2.2)

remove_title: Remove plot title or caption

Description

Remove plot title or caption

Usage

remove_title(plot)

remove_caption(plot)

Value

A tidyplot object.

Arguments

plot

A tidyplot generated with the function tidyplot().

Examples

Run this code
# Before removing
animals |>
  tidyplot(x = weight, y = speed, color = family) |>
  add_data_points() |>
  add_title("Name of the plot") |>
  add_caption("This is the caption")

# After removing
animals |>
  tidyplot(x = weight, y = speed, color = family) |>
  add_data_points() |>
  add_title("Name of the plot") |>
  add_caption("This is the caption") |>
  remove_title()

animals |>
  tidyplot(x = weight, y = speed, color = family) |>
  add_data_points() |>
  add_title("Name of the plot") |>
  add_caption("This is the caption") |>
  remove_caption()

Run the code above in your browser using DataLab