【问题标题】:How do I do a jointplot in R the same way as I do it python (seaborn package)如何在 R 中以与 python 相同的方式进行联合图(seaborn 包)
【发布时间】:2015-09-15 10:44:42
【问题描述】:

如何在 R 中以与 python(seaborn 包)相同的方式进行联合绘图

在python中

import seaborn as sns
sns.jointplot(bigdiamonds["price"], bigdiamonds["carat"])

<seaborn.axisgrid.JointGrid at 0x207230b0>

我如何在 R 中做到这一点?

【问题讨论】:

  • 到目前为止你尝试了什么?
  • 几周前刚看到in a blog post,它使用了ggExtra 包和ggMarginal 函数。

标签: python r visualization seaborn


【解决方案1】:

谢谢马吕斯

我是从博文中做到的

devtools::install_github("WinVector/WVPlots")
library(WVPlots)
ScatterHist(diamonds, "price", "carat")

得到了这个

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-09-27
    • 2019-04-13
    • 1970-01-01
    相关资源
    最近更新 更多