Arrow guide
Adding arrow patches to plots.
Arrows are often used to annotate plots. This tutorial shows how to plot arrows that behave differently when the data limits on a plot are changed. In general, points on a plot can either be fixed in "data space" or "display space". Something plotted in data space moves when the data limits are altered - an example would be the points in a scatter plot. Something plotted in display space stays static when data limits are altered - an example would be a figure title or the axis labels.
Arrows consist of a head (and possibly a tail) and a stem drawn between a start point and end point, called 'anchor points' from now on. Here we show three use cases for plotting arrows, depending on whether the head or anchor points need to be fixed in data or display space:
Head shape fixed in display space, anchor points fixed in data space
Head shape and anchor points fixed in display space
Entire patch fixed in data space
Below each use case is presented in turn.
import matplotlib.pyplot as plt
import matplotlib.patches


