adjust_padding | R Documentation |
Adjust plot area padding
adjust_padding(
plot,
top = NA,
right = NA,
bottom = NA,
left = NA,
all = NA,
force_continuous = FALSE,
...
)
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 |
A tidyplot
object.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.