I am plotting scatter plot using ggplot2. When I hide the scales, the plot automatically because a little big larger. For example:
ggplot(data = iris, geom = 'blank', aes(y = Petal.Width, x = Petal.Length)) + geom_point()
ggplot(data = iris, geom = 'blank', aes(y = Petal.Width, x = Petal.Length)) +
geom_point() +
theme(axis.title.x = element_blank(),
axis.title.y = element_blank(),
legend.position = "none")
The second one is larger. How I can avoid it? I only want to hide the scales and the label but keep the plot as the first one because I want to combine the two, one with scale and one without, but keep the plot size the same. Thanks.
tricky but works. axis in white
Edit : general solution