feature request

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20170929/555210a2/attachment.html>

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
Matplotlib-devel at python.org
https://mail.python.org/mailman/listinfo/matplotlib-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20170929/09a81e87/attachment.html>

Hi,
You may also want to look at mplcursors's hover mode (
https://mplcursors.readthedocs.io/en/latest/examples/hover.html#sphx-glr-examples-hover-py
).
Antony

2017-09-29 14:24 GMT-07:00 Jody Klymak <jklymak at uvic.ca>:

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

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
Matplotlib-devel at python.org
https://mail.python.org/mailman/listinfo/matplotlib-devel

_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org
https://mail.python.org/mailman/listinfo/matplotlib-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20170929/36bae775/attachment.html>

···

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

Thanks, I'll check it out.

···

Op 29 sep. 2017 11:35 p.m. schreef "Antony Lee" <antony.lee at berkeley.edu>:

Hi,
You may also want to look at mplcursors's hover mode (https://mplcursors.
readthedocs.io/en/latest/examples/hover.html#sphx-glr-examples-hover-py).
Antony

2017-09-29 14:24 GMT-07:00 Jody Klymak <jklymak at uvic.ca>:

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
Matplotlib-devel at python.org
https://mail.python.org/mailman/listinfo/matplotlib-devel

_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org
https://mail.python.org/mailman/listinfo/matplotlib-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20170930/fc860f28/attachment.html>

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20171002/c2218949/attachment.html>

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 <rogier.delporte at gmail.com>:

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

Thanks, I'll check it out.

Hi,

You may also want to look at mplcursors's hover mode (
https://mplcursors.readthedocs.io/en/latest/examples/hover.
html#sphx-glr-examples-hover-py).
Antony

2017-09-29 14:24 GMT-07:00 Jody Klymak <jklymak at uvic.ca>:

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

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
Matplotlib-devel at python.org
https://mail.python.org/mailman/listinfo/matplotlib-devel

_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org
https://mail.python.org/mailman/listinfo/matplotlib-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20171102/044e0649/attachment.html>

···

On Sat, Sep 30, 2017 at 8:45 AM, Rogier Delporte < > rogier.delporte at gmail.com> wrote:

Op 29 sep. 2017 11:35 p.m. schreef "Antony Lee" <antony.lee at berkeley.edu >> >:

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