I need help with making a circular histogram out of a set of directional measurements in degrees (°).
I took the code from another histogram, but I need the x axis—plotted on the circle— to be in degrees and not hours like it was before.
Polar1 <- c(256, 235, 216,276,219,168, 290)
< library(ggplot,tiddyverse)
< Polar1 %>%
gather(variable, value) %>%
ggplot(mapping = aes(x = vlaue)) + coord_polar(theta = "x", start = 0, direction = 1, clip = "on")
geom_bar(stat = "identity", fill = "black", width = .9) geom_hline(yintercept = seq(0, 24, by = 2), color = "grey80", size = 0.3) +
scale_x_continuous(breaks = 0:24, expand = c(.002,0)) +
labs(x = "Degrees", title = "Tree Lean") +
theme__bw
What do I need to do to fix this.
Thanks,
Bro