r - 如何使用 bdscale 和 ggplot 均匀分布休息
问题描述
我正在尝试使用 bdscale 包和scale_x_bd
函数进行绘图,但是中断聚集在一起:
我怎样才能让它们均匀分布?
代码:
library(ggplot2)
library(bdscale)
x = data.frame(date = seq.Date(from = today() - 100, to = today(), by = 'day'))
x$idx = 1:nrow(x)
ggplot(x, aes(x = date, y = idx)) +
geom_path() +
geom_point() +
bdscale::scale_x_bd(business.dates = x$date, max.major.breaks = 10, max.minor.breaks = 10)
解决方案
推荐阅读
- ruby-on-rails - PG::UndefinedTable: 错误: 缺少 FROM 子句条目
- mutex - Uart dma receive interrupt stops receiving data after several minutes
- javascript - Remove child elements, but keep contents using jQuery/javascript
- java - MockMvcResultMatchers - jsonPath() vs content()
- robotframework - FOR 循环不包含关键字
- kubernetes - 如何在 OpenEBS 中扩展 Jiva 存储卷?
- android - How to hide android's bottom navigation bar in flutter
- openebs - 我可以从我的节点(OpenEBS)运行 mayactl 吗?
- database - Drupal 8 中的内容类型是否与数据库中的表相同?
- ios - 在动画的 UIView 上获取点的颜色