小编gla*_*con的帖子

填写geom_curve ggplot2上的箭头

有没有办法让geom_curve上的箭头关闭?相同的代码适用于geom_segment.也许这是一个错误?

library(tidyverse)

set.seed(123)

data <- data_frame(x = rnorm(10), y = rnorm(10))

# NO ARROWHEAD FILL

ggplot(data, aes(x, y)) + 
  geom_point() +
  geom_curve(aes(x = 0, y = 0, xend = 1, yend = 1),
             color = "black",
             arrow = arrow(type = "closed"))

# ARROWHEAD FILL WORKS

ggplot(data, aes(x, y)) + 
  geom_point() +
  geom_segment(aes(x = 0, y = 0, xend = 1, yend = 1),
             color = "black",
             arrow = arrow(type = "closed"))
Run Code Online (Sandbox Code Playgroud)

r ggplot2 ggproto

13
推荐指数
2
解决办法
1275
查看次数

标签 统计

ggplot2 ×1

ggproto ×1

r ×1