Is it possible to make a feather plot in R? Doing some google searches only turned up one R package (feather.plot) capable of making feather plots, however it is an old package that is not available for R version 3.6.1. Below is an example of a timeseries of wind speed and direction that I would like to make a feather plot with. The x-axis would be hour, the length of each feather should be speed, and the angle of each feather should be direction.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))推荐答案这是我追求的最终产品,感谢@Allan Cameron的帮助This was the final product I was after, thanks for your help @Allan Cameronlibrary(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")) 这篇关于如何在R中绘制羽毛图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-29 03:59