简体   繁体   English

交互轴缩放 matplotlib

[英]Interactive axis rescaling matplotlib

I run Python from my terminal on Fedora at work and I run Python from my terminal on Debian (Plasma KDE) at home.我在工作时在 Fedora 上的终端上运行 Python,在家里的 Debian(Plasma KDE)上的终端上运行 Python。 On Fedora, I can rescale the plot axis after matplotlib has plotted the data but I can't rescale on Debian.在 Fedora 上,我可以在 matplotlib 绘制数据后重新缩放 plot 轴,但我无法在 Debian 上重新缩放。 I've tried several different backends and setting "matplotlib.interactive(1)" but obviously none of these have worked.我尝试了几种不同的后端并设置了“matplotlib.interactive(1)”,但显然这些都没有奏效。 Does anyone have an idea as to what the settings I need to rescale plots interactively are?有谁知道我需要以交互方式重新缩放绘图的设置是什么?

Many thanks, Niall非常感谢,尼尔

Have you tried using a Jupyter notebook with %matplotlib notebook (IPython magic command for interactive plots)?您是否尝试过将 Jupyter 笔记本与%matplotlib notebook (用于交互式绘图的 IPython 魔术命令)一起使用?

I am not familiar with Debian, but apparently it's possible to use Jupyter with it: Tutorial我不熟悉 Debian,但显然可以将 Jupyter 与它一起使用: Tutorial

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM