Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

MEP 29 (arrows)

David Stansby edited this page Jun 17, 2017 · 4 revisions
.. author:: David Stansby

This is a proposal to reorganise the ability to plot individual arrows.

Discussion

Currently Matplotlib has many different functions available to users to plot individual arrows on figures. Much functionality is duplicated, and there is currently not one agreed function to carry out this task. The end goal of this proposal is to provide a single function for users to plot individual arrows, and then deprecate and eventually remove the current functions available.

Plotting arrows fall into two categories:

  • Arrows fixed in 'display space'
  • Arrows fixed in 'data space'
  1. Clean up FancyArrowPatch (maintain API)
  2. Modify matplotlib.axes.Axes.arrow to switch to FancyArrowPatch for drawing
  3. Deprecate old functions

Users may rely on a mixture of the current functions available. Eventually this proposal plans to remove the current functions after a suitable deprecation cycle.

It is proposed that the two functions listed below are kept and rewritten/fixed to become the two go-to functions for plotting single arrows:

Display space - matplotlib.patches.YAArrow

Data space - matplotlib.patches.FancyArrowPatch

It is also proposed that FancyArrow is deprecated, as neither of the two above functions depends on them.

Clone this wiki locally
Morty Proxy This is a proxified and sanitized view of the page, visit original site.