Bar plot shows too many ticks
オープン
まだ誰も着手していません。
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
In plotly 4.10.4 a bar plot with only one date observation shows actually multiple ticks when the ticks' format is converted. Here a minimal reproducible example:
library(dplyr)
library(plotly)
df <- tibble(Time = "2025-01", Animal = "Monkey", value = 2)
df %>%
plot_ly(x = ~Time, y= ~value, color = ~Animal) %>%
layout(
xaxis = list(
type = "date",
tickformat = "%b '%y"
)
)
This is not the case though for a stacked bar plot:
df <- tibble(Time = c("2025-01", "2025-01"), Animal = c("Monkey", "Lion"), value = c(2, 3))
df %>%
plot_ly(x = ~Time, y= ~value, color = ~Animal) %>%
layout(
barmode = "stacked",
xaxis = list(
type = "date",
tickformat = "%b '%y"
)
)
When looking at the dates without formatting one can see a few minimal shifts around the actual date:
df <- tibble(Time = "2025-01", Animal = "Monkey", value = 2)
df %>%
plot_ly(x = ~Time, y= ~value, color = ~Animal) %>%
layout(
xaxis = list(
type = "date"
)
)
Is this already somewhere addressed?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、plot_ly() と xaxis の type および tickformat オプションを使った単一観測の R 例を実行し、その後、積み上げ棒グラフの例およびフォーマットなしの例と比較します。日付軸と tick のフォーマットがどのように処理されているかを追跡します。完了の条件は、単一日付の棒グラフに期待される tick が表示され、追加のフォーマット済み tick が導入されない一方で、既存の積み上げ動作が変更されないことです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- r
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100