r - 设置 x 轴值
解决方案
我的猜测:scale_x_date
。如果您的日期是日期格式,请将这行代码添加到您的 ggplot 代码中:
library(scales)
scale_x_date(labels = date_format("%Y"))
推荐阅读
- html - 如果将边距和填充设置为 0 不起作用,如何删除容器左侧的额外空间?
- docker - Vivado Synthesis 挂在 Jenkins 生成的 Docker 容器中
- jenkins - 当我拥有 Amazon Corretto jdk 8 时,如何从浏览器启动代理?
- c - 不明白为什么我不断收到这段代码的分段错误
- amazon-cloudformation - 为什么在 cloudformation 中没有创建自动缩放
- swift - 选择 TableView 中的每一行,包括屏幕外的行
- nginx - Cloud Foundry - 更新到 NGINX buildpack - 部署期间出现 500 错误
- java - 我有来自 textview 的文本,我想在空行之前擦除/删除一些数据
- vb.net - 为什么当我发布我的新 Web 应用程序时计时器不工作?
- php - 如何将参数传递给内部的函数