Python的R等价物绘图工具图形目录。是否创建散点图矩阵?

2024-06-16 14:32:21 发布

您现在位置:Python中文网/ 问答频道 /正文

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

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

我在R中有dataframe,但是在R中有什么等效的代码来重新创建下面的Python调用呢? 在

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

Tags: inhttpdataframeplotonlyjupyter教程
1条回答
网友
1楼 · 发布于 2024-06-16 14:32:21

GGally包中的ggairs()函数可以很容易地通过ggplot2创建广义对图(例如散射图矩阵),并且ggplotly()知道如何将它们转换为plotly。在

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

相关问题 更多 >