[Matplotlib-devel] Overhaul of arrow plotting

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

[Matplotlib-devel] Overhaul of arrow plotting

dstansby
Hi all,

As I'm sure many of you know, there's currently a bit of a mess of functions that can be used for plotting single arrows in Matplotlib. I've decided to have a go a tackling the mess with a MEP. I have done a first draft here: https://github.com/matplotlib/matplotlib/wiki/MEP-29-(arrows)

I would appreciate input into defining the end goal; specifically I propose that we keep and fix (and possibly rename)

- matplotlib.patches.YAArrow for plotting in 'display space'
- matplotlib.patches.FancyArrowPatch for plotting in 'data space'

and deprecate and eventually remove matplotlib.patches.FancyArrow and matplotlib.patches.Arrow

Does this sound sensible? Please send any thoughts/ideas/feedback to the mailing list.

All the best,
David

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

Re: Overhaul of arrow plotting

Antony Lee
I obviously have thought much less about this than you, but is there a reason why you need separate functions to plot in data and in display space?  Could you not just (similarly to `text`) plot in data space by default and let the user pass `transform=ax.transAxes` to plot in display space?  (Yes, there would be some difficulties regarding the arrow head, which probably always needs to be plotted in display space -- but it should be possible to take care of that?)

My 2c,

Antony

2017-03-08 13:08 GMT-08:00 David Stansby <[hidden email]>:
Hi all,

As I'm sure many of you know, there's currently a bit of a mess of functions that can be used for plotting single arrows in Matplotlib. I've decided to have a go a tackling the mess with a MEP. I have done a first draft here: https://github.com/matplotlib/matplotlib/wiki/MEP-29-(arrows)

I would appreciate input into defining the end goal; specifically I propose that we keep and fix (and possibly rename)

- matplotlib.patches.YAArrow for plotting in 'display space'
- matplotlib.patches.FancyArrowPatch for plotting in 'data space'

and deprecate and eventually remove matplotlib.patches.FancyArrow and matplotlib.patches.Arrow

Does this sound sensible? Please send any thoughts/ideas/feedback to the mailing list.

All the best,
David

_______________________________________________
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