在IPython笔记本中操纵内联图 [英] Manipulate inline figure in IPython notebook
问题描述
我正在使用IPython 0.12.1笔记本从Windows机器连接到运行IPython内核的Linux服务器。由于Linux机器没有安装X-Server,我使用以下配置:
I am using IPython 0.12.1 notebook to connect from a Windows machine to a Linux server where the IPython kernel runs. Since the Linux machine doesn't have an X-Server installed, I am using the following configuration:
IPKernelApp.pylab ='inline'
显示内联数字。
IPython一旦绘制就会关闭数字在笔记本中。那么如何编辑刚绘制的图形呢?喜欢添加标题。对于我的情况,绘图过程需要一段时间,我会很感激在保存它之前使用图形的方法而不需要重绘它。
IPython closes the figures once they are drawn in the notebook. So how can I edit the figure which was just drawn? Like adding a title. The drawing process takes a while for my case and I would appreciate a means to play with the figure before saving it without a need to redraw it.
我试过保存一个句柄到了这个数字并使用它,但我没有成功。
I tried saving a handle to the figure and working with that, but I was not successful.
推荐答案
我最终在ipython笔记本配置中设置了以下内容file:
I ended up setting the following in the ipython notebook configuration file:
c.InlineBackend.close_figures = False
这些数字是可编辑的,但我必须自己关闭它们而不是我做的 close('all')
The figures are editable but I have to close them myself instead which I do by close('all')
这篇关于在IPython笔记本中操纵内联图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!