如何使 Jupyter Notebook 中的内联图更大? [英] How to make inline plots in Jupyter Notebook larger?

查看:49
本文介绍了如何使 Jupyter Notebook 中的内联图更大?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用%matplotlib inline"在我的 Ipython Notebook 上内嵌了我的绘图.

I have made my plots inline on my Ipython Notebook with "%matplotlib inline."

现在,情节出现了.但是,它非常小.有没有办法使用笔记本设置或绘图设置使它看起来更大?

Now, the plot appears. However, it is very small. Is there a way to make it appear larger using either notebook settings or plot settings?

推荐答案

是的,像这样使用 figuresizedpi(在调用子图之前):

Yes, play with figuresize and dpi like so (before you call your subplot):

fig=plt.figure(figsize=(12,8), dpi= 100, facecolor='w', edgecolor='k')

正如@tacaswell 和@Hagne 指出的那样,如果不是一次性的,您也可以更改默认值:

As @tacaswell and @Hagne pointed out, you can also change the defaults if it's not a one-off:

plt.rcParams['figure.figsize'] = [12, 8]
plt.rcParams['figure.dpi'] = 100 # 200 e.g. is really fine, but slower

这篇关于如何使 Jupyter Notebook 中的内联图更大?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆