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 statistics
  • coord_equal: Ensures the units are equally scaled on the x-axis and on the y-axis
  • coord_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

Course Downloads

eBook - Data Visualization with R

eBook for Data Visualization with R

PDF
Premium
Upgrade to Pro

Data and R Code

Data and R Code Files for Data Visualization with R

ZIP
Premium
Upgrade to Pro