matplotlib 中数据选择的游标 [英] Cursors for data selection in matplotlib

查看:65
本文介绍了matplotlib 中数据选择的游标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从 matplotlib XY 图中获取用户输入.该图包含多个数据集,我需要从用户选择要使用的数据集和范围中获取.我需要这个来使模型适合正确的数据集和范围.
因此,我需要每个用户选择的两个指标,它们将附加"到特定数据集.我需要从他们那里获取数据集信息和范围信息.
以某种方式与商业绘图包(Igor Pro、Kaleidagraph、Sigmaplot ......)提供的光标"和类似命名的小部件一致,用于控制它们的拟合界面,这就是我试图重现的.

I am trying to get user input from matplotlib XY plot. The plot contains multiple datasets and I need get from user selection of which dataset to use and the range. I need this to fit model to right dataset and range.
Therefore I need two indicators, which would be "attached" to specific dataset, per user choosing. I need to get from them both the dataset info and the range info.
Somehow in line with what commercial plotting packages (Igor Pro, Kaleidagraph, Sigmaplot...) provide as "cursors" and similarly named widgets for control of their fitting interface, which is what I am trying to reproduce.

我已经使用 rangeselector 和其他方法检查了各种示例,我可以在网络上使用 Google 搜索,但我找不到的任何示例似乎都能够提供我需要的内容.

I have checked various examples with rangeselector and other methods I was able to Google on the web, but none I was able to find seems to be able to provide what I need.

请问有没有人指点一下去哪里看或者从什么开始?

Would anyone have any pointers to where to look or what to start with, please?

推荐答案

你可能想看看这个例子:http://matplotlib.sourceforge.net/examples/pylab_examples/ginput_manual_clabel.html有趣的函数是 ginput、waitforbuttonpress.

You might want to look at this example: http://matplotlib.sourceforge.net/examples/pylab_examples/ginput_manual_clabel.html The interesting functions are ginput, waitforbuttonpress.

这篇关于matplotlib 中数据选择的游标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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