R语言中绘制外围色重内层色浅的三角形

 

 

R语言中绘制外围色重内层色前的三角形:

library(ggplot2)

df <- data.frame(
  x = c(1, 2, 3, 4, 5),
  y = c(2, 1, 3, 5, 4)
)

ggplot(df, aes(x = x, y = y)) +
  geom_point(
    shape = 24,       # 圆形,可填充
    size = 10,        # 点的整体大小
    color = "blue",   # 外圈颜色
    fill  = "lightblue", # 内部填充颜色
    stroke = 2        # 外圈线条粗细
  )

 

image

 。

 

posted @ 2025-09-24 20:17  小鲨鱼2018  阅读(8)  评论(0)    收藏  举报