Time series plot x range starts from 1970
未关闭
还没有人认领这个 Issue。
bug
priority: medium
- 主要语言
- R
- 星标
- 2.7k
- 派生
- 641
- PR 合并指标
- 30 天内没有已合并 PR
描述
When I'm trying to plot a time series coloured by the value of variable, the date range starts from 1970. It defaults to a sensible date if I exclude the color argument. I can certainly manually specify the xaxis range, but when I double click the plot to reset the scale it goes back to the 1970 range again, which is quite annoying.
library(lubridate)
library(plotly)
data <- data.frame(date = seq(from = ymd_hms("20190101 000000"),
to = ymd_hms("20190301 000000"),
by = "1 hour"),
y = round(runif(1417, 0, 10)))
data %>%
plot_ly(x = ~date, y = ~y, color = ~y) %>%
add_markers()

贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从使用 plot_ly(x = ~date, y = ~y, color = ~y) 和 add_markers() 的可复现 R 示例开始,并将其与省略 color 的情况进行比较。调查 x 轴重置为何使用 1970 年的范围,并验证双击重置是否能在不手动指定 xaxis 范围的情况下保留 2019 年的日期范围。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- plotly, r
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100