Closed
Description
This is one of the unsupported features from the cookbook, see Issue #161.
There's a problem with setting the scaling of the axes to an equal ratio, with one visual unit being representing the same numeric unit on both axes. There's also a problem when I set them to ratios other than 1:1.
# Data where x ranges from 0-10, y ranges from 0-30
set.seed(202)
dat <- data.frame(
xval = runif(40,0,10),
yval = runif(40,0,30)
)
sp <- ggplot(dat, aes(xval, yval)) + geom_point()
# Force equal scaling
sp + coord_fixed()
# Equal scaling, with the total x axis the same length as the total y axis
sp + coord_fixed(ratio=1/3)
Metadata
Metadata
Assignees
Labels
No labels