这是我所追求的最终产品,感谢@Allan Cameron 的帮助
library(ggplot2)
library(tidyverse)
library(dplyr)
set.seed(123)
wind.df <- data.frame(hour = 1:10,
speed = runif(n=10, min = 1, max = 10),
direction <- runif(n=10, min = 0, max = 360))
wind.df %>%
ggplot(aes(x = hour, y = 0, angle = direction, radius = speed)) +
geom_spoke(size = 1,
arrow = grid::arrow(length = unit(0.25, "cm"), type = "open")) +
geom_hline(yintercept = 0, color = "gray50") +
geom_point() +
ylab(expression(paste("Absolute Wind Speed (m ", s^-1,")"))) +
ylim(-10,10) +
scale_x_continuous(limits = c(0,12),
breaks = c(seq(from = 0, to = 10, by = 1))) +
theme_bw() +
theme(panel.grid = element_blank(),
text = element_text(size = 12),
axis.text.x = element_text(size = 12, color = "black"),
axis.text.y = element_text(size = 12, color = "black"))