geom_text() re-renders every frame in animation if there are values outside of bounds
オープン
まだ誰も着手していません。
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I've found that when using animation in a ggplot object that has a limited view using scale_y_continuous(), only a (seemingly random) set of the visible text values rerender on every frame. Gif and reprex below.

text_data <- tibble::tribble(
~text,~x,~y,
"test1",1,1,
"test2",1,2,
"test3",2,1,
"test4",2,2
)
point_data <- tibble::tribble(
~x,~y,
1,1,
2,1,
3,1,
1,2,
2,2,
3,2
)
p <- ggplot() +
geom_text(aes(x = x,y = y,label = text),data = text_data) +
geom_jitter(aes(x = x,y = y,frame = x,color = y),data = point_data) +
scale_y_continuous(limits = c(0,1.5)) #view limited to 1.5 and thus does not show the text_data observations in y position of 2
ggplotly(p) %>%
animation_opts(redraw = F,frame = 2000,transition = 2000)
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
提供された R reprex を ggplotly と限定された scale_y_continuous() の範囲で実行し、アニメーションの挙動を再現します。範囲外の geom_text 値に対する ggplotly アニメーションのレンダリングパスを追跡します。可視テキストがフレーム間で安定して保持され、繰り返し再レンダリングされなければ完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- r
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100