| coord_equal {ggplot2} | R Documentation |
Equal scale cartesian coordinates
coord_equal(ratio=1, ...)
ratio |
NULL |
... |
ignored |
An equal scale coordinate system plays a similar role to ?eqscplot in MASS, but it works for all types of graphics, not just scatterplots.
This coordinate system has one parameter, ratio, which specifies the ratio between the x and y scales. An aspect ratio of two means that the plot will be twice as high as wide. An aspection ratio of 1/2 means that the plot will be twice as wide as high. By default, the aspect.ratio of the plot will also be set to this value.
This page describes coord_equal, see layer and qplot for how to create a complete plot from individual components.
A layer
Hadley Wickham, http://had.co.nz/
## Not run:
# coord_equal ensures that the ranges of axes are equal to the
# specified ratio (1 by default, indicating equal ranges).
qplot(mpg, wt, data=mtcars) + coord_equal(ratio=1)
qplot(mpg, wt, data=mtcars) + coord_equal(ratio=5)
qplot(mpg, wt, data=mtcars) + coord_equal(ratio=1/5)
# Resize the plot, and you'll see that the specified aspect ratio is
# mantained
## End(Not run)