Implement geom_GeomPathInterpolate() so geom_link() from ggforce will work
オープン
まだ誰も着手していません。
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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.

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( )
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
サポートされていないエントリーポイント geom_GeomPathInterpolate() に対する ggplotly() の変換パスから開始し、提供された geom_link2 の例で警告を再現します。geom がどのように変換されるかを追跡し、その後、既存の点を保持したままグラデーションラインが警告なしでレンダリングされることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- r
- 領域
- data-visualization
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100