|
install.packages("ggquiver")
library(ggquiver)
之后:
g<-ggplot(data) +
aes(x = lon, y = lat) +
geom_contour_fill(aes(z = speed)) +
geom_quiver(aes(dx = v, dy = u),
L = 6,
arrow.length = 0.8,
arrow.angle = 13,
size = 0.6,
color = "red") +
scale_fill_gradient2(low = "green",
mid = "blue",
high = "black",
midpoint = 5) +
geom_polygon(data = md,
aes(lon, lat),
rule = "winding",
color = "white",
alpha = 0,
size = 0.5) +
coord_cartesian(xlim = c(-10, 5), ylim = c(35, 45)) +
theme_bw() +
theme(aspect.ratio = 1,
panel.grid = element_blank(),
legend.position = "none")
出现:
Warning messages:
1: Ignoring unknown parameters: L, arrow.length, arrow.angle
2: Ignoring unknown aesthetics: dx, dy
唉,没学会。惭愧
|