Coordinates in ggplot2 in R
Premium
The coordinate system of a plot refers to the space on which the data is plotted. The coordinate system of a plot, together with the x and y position scale, determines the location of geoms.
Below are the available coordinate options:
coord_cartesian
: This is the default coordinate system (x horizontal from left to right, y vertical from bottom to top)coord_flip
: Flipped cartesian coordinate system (x vertical from bottom to top, y horizontal from left to right)coord_trans
: Used to to transform the coordinate system. We, i.e., substitute traditional axes with logarithmic axes and then present the values and statisticscoord_equal
: Ensures the units are equally scaled on the x-axis and on the y-axiscoord_polar
: Polar coordinate system; the x (or y) scale is mapped to the angle (theta)coord_map
: Various map projections
Unlock Premium Content
Upgrade your account to access the full article, downloads, and exercises.
You'll get access to:
- Access complete tutorials and examples
- Download source code and resources
- Follow along with practical exercises
- Get in-depth explanations