Hi there,
I am using ggplot2 package to get a pie chart. The direction is anti-clockwise while I was using coord_polar with the default parameter (direction=1).
After testing with the classical code online, the result is still strange.
Here is the code:
#' # A pie chart = stacked bar chart + polar coordinates
pie <- ggplot(mtcars, aes(x = factor(1), fill = factor(cyl))) +
geom_bar(width = 1)
pie + coord_polar(theta = "y")
A B
Many thanks!
Bert, F