plotly / plotly/plotly.R

ggplotly: geom_path interpretation of size

オープン
#340 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug
主要言語
R
スター
2.7k
フォーク
641
PR マージ指標
30日以内にマージされた PR はありません

説明

For a visualization I'm making thick curves as follows:

require(ggplot2)
require(plotly)
require(Hmisc)
len=100
edge=data.frame(bezier(x=c(0, 1, 2), y=c(0, 1, 0),evaluation = len))
edge$Sequence <- sin( seq(0,pi,length.out=len) ) 
gg = ggplot(edge,aes(x = x, y = y, size = Sequence)) +  geom_path() + scale_size( range = c(.3, 20), guide = F) + theme_bw(base_size = 16) + ylim(0,.6) + scale_alpha(guide=F)
pl <- ggplotly(gg)

which in ggplot2 gives:
image

but which with ggplotly

pl <- ggplotly(gg)

gives
image

I think the problem is that ggplotly is assuming every different "size" should be considered as a separate path, whereas ggplot2 is not.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

提供された R の例を ggplotly で再現し、geom_path のレンダリングを ggplot2 と比較します。ggplotly がパスに対する変化する size aesthetic をどのように解釈するかを追跡します。曲線が 1 つの連続したパスのままになり、ggplot2 の結果と一致すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
r
領域
data-visualization
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。