To do this with ggplot2, you need to use coord_polar , ggplot2 will do all the transformations for you. Example in code:
library(ggplot2)

# With polar coordinates ggplot(aes(x = speed, y = dist), data = cars) + geom_point() + coord_polar(theta = "dist")

source share