Search code examples
pythonqtpyqtcurvecurve-fitting

Qt: Curve editor or something similar?


I'm using Qt4.8 via PyQt in a Python application. Everything is working fine :-) But I need to present the user with some kind of curve editor, these widgets commonly found in image editing programs for adjusting contrast or color or stuff like this.

So I basically need a widget, which displays a curve with axes and stuff like that and the user should be able to "drop" points onto the curve and adjust the curve.

I thought I could use matplotlib for this, but as far as I see it doesn't provide any "editing" capability...


Solution

  • You can do curve editor with matplotlib. See for example this YouTube video: http://www.youtube.com/watch?v=nCv_MhaeFo8

    And then check the event handling examples: http://matplotlib.sourceforge.net/examples/event_handling/index.html