Version 4.10.0 bug displaying hover text in output
オープン
まだ誰も着手していません。
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
With version 4.10.0, there appears to be a bug that causes hover text to display in the output figure for bar plots. It seems that this is somehow related to the size of the bars and the window in which the figure is displayed. Adding textposition = "none" to the plot_ly() call seems to resolve this issue, however this was not required with the previous version (4.9.1).
Reproducible example using code from Text Mining with R:
library(tidyverse)
library(plotly)
library(tidytext)
library(janeaustenr)
austen_bigrams <- austen_books() %>%
unnest_tokens(bigram, text, token = "ngrams", n = 2)
bigrams_separated <- austen_bigrams %>%
separate(bigram, c("word1", "word2"), sep = " ")
bigrams_filtered <- bigrams_separated %>%
filter(!word1 %in% stop_words$word) %>%
filter(!word2 %in% stop_words$word)
# new bigram counts:
bigram_counts <- bigrams_filtered %>%
count(word1, word2, sort = TRUE)
bigrams_united <- bigrams_filtered %>%
unite(bigram, word1, word2, sep = " ")
bigram_tf_idf <- bigrams_united %>%
count(book, bigram) %>%
bind_tf_idf(bigram, book, n) %>%
arrange(desc(tf_idf)) %>%
group_by(book) %>%
slice_max(tf_idf, n = 10) %>%
mutate(bigram = fct_reorder(bigram, tf_idf))
bigram_tf_idf %>%
do(p = plot_ly(., x = ~tf_idf, y = ~bigram, color = ~book, type = "bar", hoverinfo = "text", text = ~paste(bigram, "<br> tf-idf: ", tf_idf))) %>%
subplot(nrows = 3, shareX = FALSE, shareY = FALSE)
Snippet of the resulting figure:
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
plot_ly() と subplot() を使用して再現可能な R の例を実行し、バージョン 4.10.0 と 4.9.1 で棒グラフの出力を比較してください。hoverinfo = "text" であるにもかかわらず図にホバーテキストが表示される理由を調査してください。textposition = "none" を追加しなくても期待されるホバー動作が機能すれば、issue は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- r
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100