Let's explore the types of coordinates:
- Cartesian (coord_cartesian() ): ggplot uses a Cartesian coordinate system by default, but sometimes, one might want to use polar coordinates, which is another way of looking at fractions. One possible use of the command is to transform a bar chart into a pie chart.
- Polar (coord_polar() ): In ggplot2, the Cartesian coordinates (x, y) become the polar coordinates theta and r. You can specify which coordinate is theta and which is r.
Let's see an example to understand polar coordinates in the next section.