-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
Milestone
Description
Please notice the scale of x axis:
ggplot() +
coord_polar() +
scale_x_continuous(limits = c(0, 2 * pi), breaks = seq(0, 1.8, by = 0.2) * pi, labels = function(x) {
lapply(x / pi, function(x) {
if (x == 0) {
return(bquote(0))
} else {
return(bquote(.(x) * pi))
}
})
}) +
geom_vline(xintercept = 1:6)
ggplot() +
scale_x_continuous(limits = c(0, 2 * pi), breaks = seq(0, 1.8, by = 0.2) * pi, labels = function(x) {
lapply(x / pi, function(x) {
if (x == 0) {
return(bquote(0))
} else {
return(bquote(.(x) * pi))
}
})
}) +
geom_vline(xintercept = 1:6)