Learn R Programming

tidyplots (version 0.2.2)

remove_padding: Remove plot area padding

Description

Remove plot area padding

Usage

remove_padding(plot, force_continuous = FALSE)

Value

A tidyplot object.

Arguments

plot

A tidyplot generated with the function tidyplot().

force_continuous

Whether to force the axis to be continuous. Defaults to FALSE.

Examples

Run this code
# Before removing
animals |>
  tidyplot(x = weight, y = speed, color = family) |>
  add_data_points()

# After removing
animals |>
  tidyplot(x = weight, y = speed, color = family) |>
  add_data_points() |>
  remove_padding()

Run the code above in your browser using DataLab