I am plotting PCA data and by default, ggplot2 uses different grid spacing on the X and Y axis (e.g. each tick on the x axis = 10, but each tick on the y axis = 5). I need to plot a wide range of data, so I do not want to set manual limits for the y and x axes each time.
I tried the coord_fixed()
solution in this similar question, but it does not work well, and it still only makes the grid square, and does not force the scale of the grid to be the same on x and y.
Here is a reproducible example:
library(ggplot2)
ggplot(mtcars, aes(mpg, cyl)) +
geom_point()