python-3.x - 更改 seaborn pair plot 图形大小
问题描述
我有以下代码
sns.pairplot(data=train,
x_vars=['x'],
y_vars=['y'])
plt.show()
如果这有什么不同,我正在 jupyter notebook 中编程,我想绘制一个更大的图,但我做不到。我搜索互联网和文档提到使用高度属性 https://seaborn.pydata.org/generated/seaborn.pairplot.html 但是在使用以下代码时总是会导致错误。
sns.pairplot(data=train, height=3,
x_vars=['x'],
y_vars=['y'])
plt.show()
TypeError: pairplot() got an unexpected keyword argument 'height'
解决方案
该height
参数在 seaborn 0.9.0 中可用。
sns.pairplot(..., height=3)
在 seaborn 0.8.1(或更低版本)中,这个参数被命名为size
.
sns.pairplot(..., size=3)
推荐阅读
- antlr4 - ANTLR4 - 如何中断
- javascript - 如何在 react-express 节点应用程序中将对象从服务器发送到客户端组件
- docker - Kubernetes 多主设置
- php - 除了 ->ownerDocument->saveXML() 是否有其他方法来获取带有标签的节点 html
- hadoop - 聚集保留在纱线现场。这是什么意思,它是如何工作的?
- click - 为什么在应用了同位素过滤器的页面加载时会触发点击功能
- java - SpringMVC非web项目在Intelij Idea中运行良好,但是导出为jar文件时出现错误
- python - 从不同子文件夹的文件中读取数据帧
- c# - 在 C# 中使用 Task.FromResult v/s await
- python - 在python中将消息从Kafka发送到socket.io