所有Pyplot图表的默认尺寸
我有一个笔记本,上面有几个地块,从一开始就可以使用以下代码:
plt.rcParams['figure.figsize'] = [16, 9]
plt.rcParams['figure.dpi'] = 100
因此,笔记本中生成的所有图表都有此大小。这只是停止工作(我想在上一个PIP更新后),现在所有图表都具有不同的默认大小(小得多)。
现在,如何为所有Pyplot图表设置默认大小?
I have a notebook with several plots where I have at the very beginning the following code:
plt.rcParams['figure.figsize'] = [16, 9]
plt.rcParams['figure.dpi'] = 100
So that all the charts generated in the notebook have this size. This just stopped working (I suppose after the last pip update) and now all the charts have a different default size (much smaller).
How can I set now the default size for all my pyplot charts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
罗里,你是对的。
不知何故,我错过了
%matplotlib inline
魔术函数,然后才能设置绘图的属性。这就是现在对我有用的东西:谢谢!
Rory, you are right.
Somehow I missed the
%matplotlib inline
magic function before settings the properties of the plot. So this is what is working for me now:Thanks!