adjust_padding {tidyplots} | R Documentation |
Adjust plot area padding
Description
Adjust plot area padding
Usage
adjust_padding(
plot,
top = NA,
right = NA,
bottom = NA,
left = NA,
all = NA,
force_continuous = FALSE,
...
)
Arguments
plot |
A |
top |
Extra space between the data points and the top. Defaults to |
right |
Extra space between the data points and the right. Defaults to |
bottom |
Extra space between the data points and the bottom. Defaults to |
left |
Extra space between the data points and the left. Defaults to |
all |
Extra space around the data pointst. Overwrites |
force_continuous |
Whether to force the axis to be continuous. Defaults to |
... |
Arguments passed on to the |
Value
A tidyplot
object.
Examples
# Plot without adjustments
animals |>
tidyplot(x = weight, y = size, color = family) |>
add_data_points() |>
adjust_padding()
# Increase plot area padding
animals |>
tidyplot(x = weight, y = size, color = family) |>
add_data_points() |>
adjust_padding(all = 0.2)
animals |>
tidyplot(x = weight, y = size, color = family) |>
add_data_points() |>
adjust_padding(top = 0.8)
animals |>
tidyplot(x = weight, y = size, color = family) |>
add_data_points() |>
adjust_padding(bottom = 0.8)
animals |>
tidyplot(x = weight, y = size, color = family) |>
add_data_points() |>
adjust_padding(right = 0.8)
animals |>
tidyplot(x = weight, y = size, color = family) |>
add_data_points() |>
adjust_padding(left = 0.8)
[Package tidyplots version 0.3.1 Index]