绘制“真实尺寸"matplotlib中的数字(滚动条而不是缩放条) [英] Ploting "real size" figures in matplotlib (scrollbars instead of zooming)

查看:63
本文介绍了绘制“真实尺寸"matplotlib中的数字(滚动条而不是缩放条)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 matplotlib 中绘图时遇到问题.我需要绘制一个宽幅的图,该图代表及时分配无线电资源.但是当一个时间段很大时,情节会缩小,我需要放大它以查看特定片段.我想要的是在不缩放的情况下绘制数据(实际大小"),并使用滚动条在水平方向(及时)上滚动图.有可能吗?

I have a problem with plotting in matplotlib. I need to plot a wide figure which represents an allocation of radio resources in time. But when a time period is big, the plot shrinks and I need to zoom it to see what is in particular fragment. What I want, is to plot the data without scaling ("real size") and to use the scrollbars to scroll the plot horizontally (in time). Is that possible?

推荐答案

这是 scipy 食谱中的一个示例:

Here's an example from a scipy cookbook:

在嵌入的 matplotlib 画布中绘制很长的序列时wxPython应用程序,有时能够显示一个部分序列而不诉诸可滚动窗口,因此两个轴都保持可见.这样做的方法如下:

When plotting a very long sequence in a matplotlib canvas embedded in a wxPython application, it sometimes is useful to be able to display a portion of the sequence without resorting to a scrollable window so that both axes remain visible. Here is how to do so:

http://www.scipy.org/Cookbook/Matplotlib/ScrollingPlot

这篇关于绘制“真实尺寸"matplotlib中的数字(滚动条而不是缩放条)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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