add_annotations doesn't respect log scale
オープン
まだ誰も着手していません。
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
When using add_annotations with a log scale, the coordinates of the annotations are not automatically log-transformed.
exp_dat <- data.frame(x = 0:100,
y = exp(0:100))
ann_dat <- data.frame(x = c(1, 10, 100),
y = exp(c(1, 10, 100)),
label = c(1, 10, 100))
plot_ly(type = "scatter", mode = "lines+markers") %>%
add_lines(., data = exp_dat, x = ~x, y = ~y) %>%
add_annotations(., data = ann_dat, x = ~x, y = ~y, text = ~label) %>%
layout(., yaxis = list(type = "log"))
The desired result can be obtained by manually log-transforming the coordinates, but it would be more intuitive if this wasn't necessary.
plot_ly(type = "scatter", mode = "lines+markers") %>%
add_lines(., data = exp_dat, x = ~x, y = ~y) %>%
add_annotations(., data = ann_dat, x = ~x, y = ~log10(y), text = ~label) %>%
layout(., yaxis = list(type = "log"))
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
提供された R の例を add_annotations と対数 y 軸で再現し、次に add_annotations のエントリポイントとアノテーション座標の処理方法を調べます。y 値を手動で変換せずに、対数スケール上でアノテーションが正しく揃えば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- r
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 45/100