Seems like you cannot set the linestyle for arrows via tuples. This just works fine
plt.annotate("",
xy=(0, 0), xycoords='data', xytext=(1, 1), textcoords='data',
arrowprops=dict(arrowstyle="->", connectionstyle="arc3", color='0.5', ls='--')
)
where the bold part sets the linestyle of the arrow. However, this won't work and throws an error when using the tuple description of linestyle:
plt.annotate("",
xy=(0, 0), xycoords='data', xytext=(1, 1), textcoords='data',
arrowprops=dict(arrowstyle="->", connectionstyle="arc3", color='0.5', ls=(0, [2 ,2]))
)
The error says
TypeError: unhashable type: 'list'
The same is true for plt.arrow. The tuple description works just fine on regular plots:
xx = np.linspace(0, 1, 100)
plt.plot(xx, xx, ls=(0, [2, 2]))
Am I doing something wrong or is this an actual bug?