J.A*_*ado 9 python plot matplotlib figure seaborn
我正在使用带有数据框的 seaborn FacetGrid 制作绘图:df。由于色调功能,我正在使用 sns。
见代码:
import seaborn as sns
import matplotlib.pyplot as plt
grid = sns.FacetGrid(df,hue='var')
grid.map(plt.scatter, x, y).add_legend()
grid.set(ylim=ylim,xlim=xlim)
plt.show()
Run Code Online (Sandbox Code Playgroud)
通常我会使用以下方法访问 figsize:
fig, ax = plt.subplots(figsize=(20, 10))
Run Code Online (Sandbox Code Playgroud)
或者
plt.figure(figsize=(20,10))
Run Code Online (Sandbox Code Playgroud)
但是现在,因为我使用的是 seaborn,所以我不知道如何访问图形对象。
如何访问图形对象以更改绘图的大小?
| 归档时间: |
|
| 查看次数: |
14399 次 |
| 最近记录: |