r - 有没有办法在 R 的轴上从 x 跳到 100?
问题描述
我想使用 survial 和 survminer 包从 R 中的生存分析中绘制数据。我的生存概率从 0% 到 5% 不等。我想要一个将 ylim 设置为 0 到 20 但在轴上也应该有 100% 的图表。看起来像这样:
我正在这样做:
tlr_plot <- ggsurvplot(survFit_TLR, fun = "event", conf.int = FALSE, risk.table = 'nrisk_cumevents', title="TLR", legend = "none", tables.theme = theme_cleantable(),surv.scale="percent")
tlr_plot$plot <- tlr_plot$plot +
scale_x_discrete(breaks = c(0,180,365,540,730), labels = c(0,180,365,540,730), limits=0:741)
tlr_plot
解决方案
推荐阅读
- flutter - 热重载在特定文件中不起作用 - Flutter
- php - 如何打印多行 JSON 结果?
- c# - 防止 Visual Studio 将图像序列化为 resx 文件
- javascript - 不和谐.js | 检测消息是否包含表情符号
- python - 如何从格式为 4/23/20 的 pandas data_frame 中提取日期和月份?
- flask - 用于测验的烧瓶计时器
- opencv - 网络摄像头视频源的openCV问题
- function - 在批处理文件中执行重复任务的最有效方法是什么?
- javascript - 使用锚标签将电子重定向到浏览器
- fault-tolerance - 如何确定 filex 的最佳容错内存?