【问题标题】:Seaborn Jointplot Change Figsize [duplicate]Seaborn Jointplot 更改 Figsize [重复]
【发布时间】:2019-10-28 19:40:10
【问题描述】:

我正在使用 Jupyter Notebook,想要一个全宽的关节图。

我似乎无法让它工作。

g = sns.jointplot(x="pos", y="diff", data=plot_data)
plt.figure(figsize=(16, 6))

根本不改变大小。

fig, ax = plt.subplots(figsize=(16, 6))
g = sns.jointplot(ax=ax, x="pos", y="diff", data=plot_data)

引发错误。

【问题讨论】:

  • 你应该把它作为你的答案,因为它确实有效。
  • 好的,添加为其他可能面临类似问题的人的答案。

标签: python matplotlib seaborn


【解决方案1】:

使用jointplot函数中的height参数来设置图形的大小(它将是正方形)。参考官方文档:seaborn.pydata.org/generated/seaborn.jointplot.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-09-15
    • 2022-07-28
    • 1970-01-01
    • 2021-08-31
    • 2021-12-18
    • 2018-12-15
    • 2016-12-08
    • 2015-07-06
    相关资源
    最近更新 更多