r语言 - 如何使用panel删除facet参数.实验室与survminer::ggsurvplot_facet?



我使用以下代码对生存分析中的图进行facet划分:

surv_plot <- ggsurvplot_facet(fit, matrix_surv, facet.by = c("Place","Year"),
panel.labs =list(Lieu_libelle = c("Austria","Belgium","Denmark","Finland","Italy"), 
Year = c("2018", "2019", "2020", "2021")))

我想修改facet标签文本。与面板。实验室,名字确实是根据提供的列表修改的。但是标签仍然显示facetting参数所以对于每个标签,我首先有"Place: "或"年份:"在情节中的名字之前。我怎么能放下这个?这就像放弃"性"一样。在这些图形的平面上

您可以使用内部函数选项short.panel.labs.

这将改变你的代码为:

surv_plot <- ggsurvplot_facet(fit, matrix_surv, facet.by = c("Place","Year"),
panel.labs =list(Lieu_libelle = c("Austria","Belgium","Denmark","Finland","Italy"), 
Year = c("2018", "2019", "2020", "2021")),
short.panel.labs=T)

相关内容

  • 没有找到相关文章

最新更新