ipython notebook --pylab内联:缩放图 [英] ipython notebook --pylab inline: zooming of a plot

查看:59
本文介绍了ipython notebook --pylab内联:缩放图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果激活了内联,是否可以放大绘图?特别是对于3d图而言,旋转和缩放是一项必不可少的功能.

Is it possible to zoom into a plot if inline is activated? Especially regarding to 3d-plots rotating and zooming is a necessary feature.

推荐答案

现在感谢 mpld3 ,启用内联缩放非常容易情节!

Now thanks to mpld3 it's super easy to enable zooming in inline plots!

您需要做的就是安装mpld3(pip install mpld3),然后将其添加到笔记本中:

All you have to do is install mpld3 (pip install mpld3), and then add this to your notebook:

%matplotlib inline
import mpld3
mpld3.enable_notebook()

现在,您的绘图将在左下角显示一个工具栏菜单,您可以在其中启用鼠标缩放:)

Now your plots will get a toolbar menu at the bottom left, in which you can enable mouse zooming :)

这篇关于ipython notebook --pylab内联:缩放图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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