【问题标题】:The R equivalent of the Python plotly.tools.FigureFactory.create_scatterplotmatrix?Python plotly.tools.FigureFactory.create_scatterplotmatrix 的 R 等效项?
【发布时间】:2016-08-11 12:10:02
【问题描述】:

我正在尝试在 R 中重新创建 Python plotly 教程中的 scatterplotmatrix:

http://moderndata.plot.ly/using-plotly-in-jupyter-notebooks-on-microsoft-azure/

我在 R 中有数据框,但是在 R 中重新创建以下 Python 调用的等效绘图代码是什么?

fig = FigureFactory.create_scatterplotmatrix(
    df, diag='histogram', index='manufacturer',
    height=800, width=800,
    title='Motor Trend Car Road Tests Scatterplot Matrix'
)

【问题讨论】:

    标签: python r plotly


    【解决方案1】:

    GGally 包中的ggairs() 函数可以通过ggplot2 轻松创建广义配对图(例如散点图矩阵),ggplotly() 知道如何将它们转换为 plotly。

    library(GGally)
    library(plotly)
    ggplotly(ggpairs(iris))
    

    【讨论】:

    • 似乎没有直接的等价物,但您可以使用 ggally/ggplotly 构建相同的东西
    猜你喜欢
    • 2021-11-04
    • 1970-01-01
    • 2014-10-02
    • 1970-01-01
    • 2014-04-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-07
    相关资源
    最近更新 更多