Question Details

No question body available.

Tags

r ggplot2 polar-coordinates

Answers (1)

May 11, 2026 Score: 0 Rep: 70,850 Quality: Low Completeness: 70%

Implementing the suggestion from the comments, here's a hack that maps the region from [-pi,0] to [pi:2pi], and adjusts the labels:

ggplot(test, aes(x= x, y =theta %% (2pi), color = x))+
  geom_line()+
  geom_point()+
  scale_color_viridis_c("x")+
  coord_radial(theta = "y", start=0,  clip= "off",
               r.axis.inside = T, expand=F, rotate.angle = T)+
  scale_y_continuous(limits = c(0, 2pi),
                     breaks = c(0:3, 2*pi - c(1:3)),
                     labels = c(0:3, -(1:3)))+
  xlab("x")+
  ylab("Angle (rad)")

enter image description here