acid_scale_y_continuous_nopad | R Documentation |
Remove Y axis padding
acid_scale_y_continuous_nopad()
ggproto
.
Updated 2023-08-11.
library(ggplot2)
g <- ggplot(data = mpg, aes(x = class)) +
geom_bar()
## By default, plots contain padding at the top of the graph.
print(g)
## This function will automatically remove the padding.
g + acid_scale_y_continuous_nopad()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.