[Matplotlib-devel] feature request

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Matplotlib-devel] feature request

Rogier Delporte
Dear maintainer(s)
Dear developpers

I would like to request a new matplotlib feature. The current version of matplotlib shows the coordinates of the cursor in the bottom right corner. It would be great if some option or mode could be added which snaps the cursor to data points. This would take some guesswork out of reading a plot with a lot of points.

I know this feature is similar to the mpldatacursor toolkit, but mpldatacursor does not provide a smooth and fast way to pinpoint a data point.

I hope someone would like to implement this feature, because I don't have sufficient programming skills to implement this myself.

Thanks for the awesomeness that is matplotlib!

Rogier

_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel
Reply | Threaded
Open this post in threaded view
|

Re: feature request

Jody Klymak

Hi Rogier,

You can already do this by writing a format_coord function and setting ax.format_coord property of the axis with your data in it.

http://matplotlib.org/examples/api/image_zcoord.html

Cheers, Jody

On 29 Sep 2017, at 6:57, Rogier Delporte wrote:

Dear maintainer(s)
Dear developpers

I would like to request a new matplotlib feature. The current version of
matplotlib shows the coordinates of the cursor in the bottom right corner.
It would be great if some option or mode could be added which snaps the
cursor to data points. This would take some guesswork out of reading a plot
with a lot of points.

I know this feature is similar to the mpldatacursor toolkit, but
mpldatacursor does not provide a smooth and fast way to pinpoint a data
point.

I hope someone would like to implement this feature, because I don't have
sufficient programming skills to implement this myself.

Thanks for the awesomeness that is matplotlib!

Rogier
_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel


_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel
Reply | Threaded
Open this post in threaded view
|

Re: feature request

Antony Lee
Hi,
Antony

2017-09-29 14:24 GMT-07:00 Jody Klymak <[hidden email]>:

Hi Rogier,

You can already do this by writing a format_coord function and setting ax.format_coord property of the axis with your data in it.

http://matplotlib.org/examples/api/image_zcoord.html

Cheers, Jody

On 29 Sep 2017, at 6:57, Rogier Delporte wrote:

Dear maintainer(s)
Dear developpers

I would like to request a new matplotlib feature. The current version of
matplotlib shows the coordinates of the cursor in the bottom right corner.
It would be great if some option or mode could be added which snaps the
cursor to data points. This would take some guesswork out of reading a plot
with a lot of points.

I know this feature is similar to the mpldatacursor toolkit, but
mpldatacursor does not provide a smooth and fast way to pinpoint a data
point.

I hope someone would like to implement this feature, because I don't have
sufficient programming skills to implement this myself.

Thanks for the awesomeness that is matplotlib!

Rogier
_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel


_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel



_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel
Reply | Threaded
Open this post in threaded view
|

Re: feature request

Rogier Delporte
Thanks, I'll check it out. 

Op 29 sep. 2017 11:35 p.m. schreef "Antony Lee" <[hidden email]>:
Hi,
Antony

2017-09-29 14:24 GMT-07:00 Jody Klymak <[hidden email]>:

Hi Rogier,

You can already do this by writing a format_coord function and setting ax.format_coord property of the axis with your data in it.

http://matplotlib.org/examples/api/image_zcoord.html

Cheers, Jody

On 29 Sep 2017, at 6:57, Rogier Delporte wrote:

Dear maintainer(s)
Dear developpers

I would like to request a new matplotlib feature. The current version of
matplotlib shows the coordinates of the cursor in the bottom right corner.
It would be great if some option or mode could be added which snaps the
cursor to data points. This would take some guesswork out of reading a plot
with a lot of points.

I know this feature is similar to the mpldatacursor toolkit, but
mpldatacursor does not provide a smooth and fast way to pinpoint a data
point.

I hope someone would like to implement this feature, because I don't have
sufficient programming skills to implement this myself.

Thanks for the awesomeness that is matplotlib!

Rogier
_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel


_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel



_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel
Reply | Threaded
Open this post in threaded view
|

[Matplotlib-devel] feature request

Tune Kamae

Dear Developers,

 

I have been developing sound-guided matplotlib to assist blind students to trace curves on the 2D plots.

 

I figured out to implement what I want for plotted curves but still struggling to enable tracing the x and y axes. The sample plot I am working with is Axes.pickable. What I cannot figure out is to get majoraxislabels when a finger-touch event occurs within a fixed distance, eg. Picker=5 of x-axis.

 

First I have to figure out if the event is onaxes. I am using what I found in Matplotlib tutorials. How should I modified the codes below?

def onpick(event):

    thisline = event.artist

    xdata = thisline.get_xdata()

    ydata = thisline.get_ydata()

    ind = event.ind

    points = tuple(zip(xdata[ind], ydata[ind]))

    print('onpick points:', points)

    if onpick:

        print ("Data points picked")

        winsound.Beep(Freq,Dur)

 

Thank you for the assistance,

 

Tune Kamae


_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel
Reply | Threaded
Open this post in threaded view
|

Re: feature request

Antony Lee
In reply to this post by Rogier Delporte
Hi,

mplcursors should work just fine with a custom pyqt widget (I often write pyqt apps as well).

To pin the bottom right text, e.g. the following works:

from matplotlib import pyplot as plt
import mplcursors

fig, ax = plt.subplots()
ax.plot([1, 2])
# By default, keep the status bar text cleared.
fig.canvas.mpl_connect(
    "motion_notify_event",
    lambda event: fig.canvas.toolbar.set_message(""))
# If the cursor matches, update the status bar text.
mplcursors.cursor(hover=True).connect(
    "add",
    lambda sel: fig.canvas.toolbar.set_message(
        sel.annotation.get_text().replace("\n", "  ")))
plt.show()

I will probably add a similar example to the mplcursors doc.

Antony

2017-11-02 5:50 GMT-07:00 Rogier Delporte <[hidden email]>:
Hi

I had a quick look at mplcursors and it's very close to what I want. I'm not sure I'll be able to use it in combination with a custom pyqt matplotlib widget.

I think it would be a very nice feature if this could be integrated right into matplotlib in such a way that the cursor readout in the bottom right corner snaps(of course it would be made optional) to the nearest data point. Unfortunately, I'm too much of a noob to implement this myself, but I'd like to request this feature be put on one of the todo-lists.

Thanks for the great library!

Rogier Delporte



On Sat, Sep 30, 2017 at 8:45 AM, Rogier Delporte <[hidden email]> wrote:
Thanks, I'll check it out. 

Op 29 sep. 2017 11:35 p.m. schreef "Antony Lee" <[hidden email]>:

Hi,
Antony

2017-09-29 14:24 GMT-07:00 Jody Klymak <[hidden email]>:

Hi Rogier,

You can already do this by writing a format_coord function and setting ax.format_coord property of the axis with your data in it.

http://matplotlib.org/examples/api/image_zcoord.html

Cheers, Jody

On 29 Sep 2017, at 6:57, Rogier Delporte wrote:

Dear maintainer(s)
Dear developpers

I would like to request a new matplotlib feature. The current version of
matplotlib shows the coordinates of the cursor in the bottom right corner.
It would be great if some option or mode could be added which snaps the
cursor to data points. This would take some guesswork out of reading a plot
with a lot of points.

I know this feature is similar to the mpldatacursor toolkit, but
mpldatacursor does not provide a smooth and fast way to pinpoint a data
point.

I hope someone would like to implement this feature, because I don't have
sufficient programming skills to implement this myself.

Thanks for the awesomeness that is matplotlib!

Rogier
_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel


_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel





_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel