【问题标题】:corrplot margins in RStudio are too smallRStudio 中的 corrplot 边距太小
【发布时间】:2017-06-26 19:06:24
【问题描述】:

当我在 R-Studio 中生成图形时,边距太小以至于它会切断绘图区域中的图形。下面的输出遵循this tutorial,它使用corrplot 库来运行Pearson 卡方残差。无论我如何调整绘图区域或缩放或导出,底部仍然被切断。我该如何调整?

【问题讨论】:

    标签: r plot data-visualization r-corrplot


    【解决方案1】:

    我的图像显示得很好。也许您可以尝试使用边距 - mar 参数也是 corrplot() 的内部参数

    这是我得到的一些边距:

    corrplot(chisq$residuals, is.cor=FALSE, mar=c(5,2,2,1))
    

    您也可以尝试转置矩阵,使其水平扩展,但不确定这是否符合您的需求:

    corrplot(t(chisq$residuals), is.cor=FALSE, mar=c(5,2,2,1))
    

    【讨论】:

    • 您好,感谢您回答问题。我认为在您的第一张图片中,您可以看到底部的数字(7.53)被切断,所以这就是我试图避免的。 mar() 参数有帮助,转置 t() 参数也很酷。不过,我似乎无法让它在 R-Studio 中看起来正确。当我在 R 中尝试时,它工作正常。
    猜你喜欢
    • 1970-01-01
    • 2018-03-02
    • 1970-01-01
    • 1970-01-01
    • 2017-01-01
    • 2017-03-07
    • 1970-01-01
    • 2021-12-06
    • 2011-05-23
    相关资源
    最近更新 更多