Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Implement geom_GeomPathInterpolate() so geom_link() from ggforce will work

未關閉
#2,195 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
r

研究方向

從不支援的進入點 geom_GeomPathInterpolate() 的 ggplotly() 轉換路徑開始,並使用提供的 geom_link2 範例重現該警告。追蹤 geom 的轉換方式,然後確認漸層線能在不產生警告的情況下進行渲染,同時保留現有的點。

由索引模型根據 Issue 內容生成。

描述

I created a ggplot with gradient line segments between points using geom_link2 from the ggforce package and it does what I want (pictured), but when I pipe it through ggplotly(), I get this warning Warning: geom_GeomPathInterpolate() has yet to be implemented in plotly. and it prints without the lines.

image

library(ggplot2)
library(plotly)
library(ggforce)

# df
data <- structure(list( Percent = c(0.32, 0.23, 0.75, 0.25, 0.482, 0.421, 0.5114, 0.3423, 0.27, 0.4324, 0.347, 0.377, 0.26, 
0.375, 0.18604, 0.241378, 0.3095, 0.348837209, 0.33333, 0.1875, 0.2820, 0.65, 0.72, 0.75, 0.81, 0.87, 0.8244),  date = structure(c(18262, 18293, 18322, 18353, 18383, 18414, 18444, 18475, 18506, 18536, 
18567, 18597, 18628, 18659, 18687, 18718, 18748, 18779, 18809, 18840, 18871, 18901, 18932, 18962, 18993, 19024, 19052), class = "Date")), row.names = c(NA, 
-27L), class = c("tbl_df", "tbl", "data.frame"))

# Create ggplot
test <- data %>% 
    ggplot( aes ( x = date, y = Percent,
                colour= Percent, 
                group = 1)) +   # Note sure why, but I have to add this
    geom_link2(  ) +
  geom_point ( ) + 
  scale_y_continuous(limits = c(0,1)) + 
  scale_colour_gradient2(low = "red", mid = "yellow" , high = "green", 
                         midpoint= 0.70,
                         limits = c(0,1)) 

# Looks good
test

# Prints warning/without line
test %>% plotly::ggplotly( ) 
主要語言
R
星號
2.7k
分支
640
PR 合併指標
30 天內沒有已合併 PR

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

plotly/plotly.R 的其他 Issue

查看 plotly/plotly.R 的全部 Issue

相似的 Issue

更多 R Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。