【问题标题】:Save a graph on a cluster将图表保存在集群上
【发布时间】:2022-01-08 03:10:37
【问题描述】:

我在集群上使用 R 包 Related。工作负载管理器是 Slurm,我将 sbacth 脚本和 Rscript 上传到集群上。

Related 有一个名为compareestimators() 的命令直接生成图表。我需要得到这张图,但我不知道该怎么做。是否可以保存在文件中?

related comparestimator() output

【问题讨论】:

    标签: r graph cluster-computing


    【解决方案1】:

    使用pdf()png() 之类的函数可以创建通常出现在/查看器中的绘图并将其保存到外部文件中,例如像这样的

    png("figures/figure1.png", width=5, height=7, res=500, units="in")
    compareestimators(...)
    dev.off()
    

    【讨论】:

    • 如果这回答了您的问题,请记住接受答案
    猜你喜欢
    • 2018-05-29
    • 1970-01-01
    • 2020-05-16
    • 2016-03-18
    • 1970-01-01
    • 2015-02-25
    • 1970-01-01
    • 2014-03-14
    • 2014-03-27
    相关资源
    最近更新 更多