[Matplotlib-users] Feedback on an implementation of a matlab-ish "datacursor"

Joe,

Do you have any feeling for performance of mpldatacursor? I’m interested to know if implementing this functionality by default (with an rcParam switch to disable) on all Axes would have a significant impact on performance?

If it is something that other people find useful, I’d be happy to submit a pull request to incorporate it into matplotlib.

Personally, I find this kind of extension better as a completely separate piece of work which one could “pip install” - it means you can be more flexible with release cycles, especially in the early days of the code when regular updates are most likely. Though I should note, I’m not against it being included in mpl as an extension, if you would prefer that.

Thanks again for sharing!

···

On 13 March 2013 10:08, Phil Elson <pelson.pub@…149…> wrote:

Thanks for this Joe, mpldatacursor looks like an excellent piece of work - I for one will be installing and using it regularly.

Thanks for sharing!

On 13 March 2013 03:58, Joe Kington <joferkington@…149…> wrote:

I recently got around to polishing up a snippet I’ve been using for quite awhile. https://github.com/joferkington/mpldatacursor/ and I was hoping to get some feeding on the current implementation.

“mpldatacursor” allows a user to easily click on an artist and display a customizable, interactive pop-up box displaying information about the selected artist (e.g. x & y, label, z for images and collections, etc). It’s a stand-alone module (and in pypi), but you could also just download the examples directory from github and copy the mpldatacursor.py file into it to try things out.

A few key questions:

  1. Is this something that anyone else finds useful?

  2. Does it seem intuitive?

  3. Does the implementation seem flexible enough for most needs? (Note that any additional kwargs are passed on to annotate to create the “data cursor”, so the appearance of the box is customizable through annotation kwargs.)

  4. Are there any obvious features missing?

  5. Any suggestions? (especially better name suggestions…)
    If it is something that other people find useful, I’d be happy to submit a pull request to incorporate it into matplotlib. (If I did, it would probably be best to drop the HighlightDataCursor class, as its limited in what it can do.)

Thanks a bunch!

-Joe


Everyone hates slow websites. So do we.

Make your web apps faster with AppDynamics

Download AppDynamics Lite for free today:

http://p.sf.net/sfu/appdyn_d2d_mar


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Hi Phil,

Joe,

Do
you have any feeling for performance of mpldatacursor? I’m interested to know if implementing this functionality by default (with an rcParam switch to disable) on all Axes would have a significant impact on performance?

It should be quite fast. In most cases only one extra annotation object per-axes will be created. The annotation is updated, rather than a new one being created, unless that’s specifically what’s desired (e.g. The display=‘multiple’ option).

If it is something that other people find useful, I’d be happy to submit a pull request to incorporate it into matplotlib.

Personally,
I find this kind of extension better as a completely separate piece of work which one could “pip install” - it means you can be more flexible with release cycles, especially in the early days of the code when regular updates are most likely. Though I should note, I’m not against it being included in mpl as an extension, if you would prefer that.

Good point! Especially in its current state, flexibility is a good thing!

Thanks again for sharing!

Thanks! Glad to!

Cheers!

-Joe

···

On 13 March 2013 10:08, Phil Elson <pelson.pub@…149…> wrote:

Thanks for this Joe, mpldatacursor looks like an excellent piece of work - I for one will be installing and using it regularly.

Thanks for sharing!

On 13 March 2013 03:58, Joe Kington <joferkington@…149…> wrote:

I recently got around to polishing up a snippet I’ve been using for quite awhile. https://github.com/joferkington/mpldatacursor/ and I was hoping to get some feeding on the current implementation.

“mpldatacursor” allows a user to easily click on an artist and
display a customizable, interactive pop-up box displaying information about the selected artist (e.g. x & y, label, z for images and collections, etc). It’s a stand-alone module (and in pypi), but you could also just download the examples directory from github and copy the
mpldatacursor.py file into it to try things out.

A few key questions:

  1. Is this something that anyone else finds useful?

  2. Does it seem intuitive?

  3. Does
    the implementation seem flexible enough for most needs? (Note that any additional kwargs are passed on to annotate to create the “data cursor”,
    so the appearance of the box is customizable through annotation kwargs.)

  4. Are there any obvious features missing?

  5. Any suggestions? (especially better name suggestions…)
    If
    it is something that other people find useful, I’d be happy to submit a
    pull request to incorporate it into matplotlib. (If I did, it would probably be best to drop the HighlightDataCursor class, as its limited in what it can do.)

Thanks a bunch!

-Joe


Everyone hates slow websites. So do we.

Make your web apps faster with AppDynamics

Download AppDynamics Lite for free today:

http://p.sf.net/sfu/appdyn_d2d_mar


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users