coord_equalcoord_equal(ratio=1, ...)
Equal scale cartesian coordinates
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.
What do you think of the documentation? Please let me know by filling out this short online survey.
Parameters control the appearance of the coord. In addition to the parameters listed below (if any), any aesthetic can be used as a parameter, in which case it will override any aesthetic mapping.
ratio: NULLThis function returns a coordinate system object.
> # 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
What do you think of the documentation? Please let me know by filling out this short online survey.