Closed as not planned
Description
Problem
When using pyplot.arrow
, the coordinates x, y, dx, dy
are within the same coordinate system than the styling kwargs, resulting in different appearances, when used on multiple plots with different scales.
import matplotlib.pyplot as plt
fig, axs = plt.subplots(nrows=3, layout='constrained')
for ii, ax in enumerate(axs.flat):
ax.set_xlim( [ ii/5, 1 - ii/5 ] )
ax.set_ylim( [ .5 - (ii+1)/50, .5 + (ii+1)/50 ] )
ax.arrow( 1 - ii/5, .5, 2 * ii/5 - 1, 0, length_includes_head=True, linewidth=0, width=.01 )
transform=ax.transAxes
transforms both, placement and appearance, resulting in homogeneous appearance and hard to handle placement.
Proposed solution
Having coordinates x, y, dx, dy
in data coordinates and styling kwargs in axes coordinates.
(And length_includes_head=True
as default cough)