drawarrow
drawarrow
is a Python package that simplifies (a lot) the process of creating and customising arrows in Matplotlib.
It provides everything you need to create any arrow you can imagine:
- double-headed
- curved
- wide or thin
- with an inflection point
- with a shadow
- And so on...
Installation
Quick Start
import matplotlib.pyplot as plt
from drawarrow import fig_arrow
fig, ax = plt.subplots()
ax.scatter(x=[1, 2, 3, 4, 5], y=[1, 2, 3, 4, 5], s=100)
fig_arrow(
head_position=(0.5, 0.5),
tail_position=(0.2, 0.7),
width=2,
radius=0.3,
color="darkred",
fill_head=False,
mutation_scale=2,
)
plt.show()
Next steps
You can have a look at this tutorial or see the reference.
Learn matplotlib
drawarrow
is supported by Matplotlib Journey, an interactive online course designed to make you a master of Matplotlib. If you want to support drawarrow
and become a Matplotlib expert, consider purchasing the course!