我怎样才能使箭头从一端移动到另一端。我想表现一种能量流。
plot <- ggplot(combined_total_active_2, aes(x = 0, y = 0)) +
coord_fixed()+
theme_void()+
theme(panel.background = element_rect(fill = "#11141a"),
plot.background = element_rect(fill = "#11141a"))
# Add lines connecting the circles
plot <- plot +
geom_curve(aes(x = 0, y = 0, xend = -1, yend = 0),
curvature = 0, arrow = arrow(length = unit(0.21, "inches")),
color = "#ffc559", size = 1.2, alpha = 0.6)+
geom_segment(aes(x = -3, y = 0, xend = 3, yend = 0), color = "#ffc559",
size = 1.5, lineend = "round") +
geom_segment(aes(x = 0, y = -3, xend = 0, yend = 3), color = "#ffc559",
size = 1.5, lineend = "round")
plot
输出:两条线段和一个箭头
1条答案
按热度按时间hts6caw31#
使用
gganimate
,您可以: