Change arrow style of matplotlib mower function

Is there a way to change the arrow style of the quiver function matplotlib ?

I tried passing the arrowprops=dict()kwarg function to a function, but it seems to work only with the annotation function .

In any case, the arrow style I'm looking for doesn't seem to be included in matplotlib. I think they are called "half arrows." I can insert these arrows using UTF-8 characters, but then the arrows cannot be adjusted, and it is difficult to align them correctly. Is there a better way to do this (perhaps with the insertion of an SVG character)?

enter image description here

My solution code above:

import matplotlib.pyplot as plt
import numpy as np
import mplstereonet
import matplotlib.image as image

#UTF-8 characters don't seem to work in the normal pyplot backend
plt.switch_backend("gtk3cairo")

fig = plt.figure()
ax = fig.add_subplot(111, projection='stereonet')

arrows = [[120, 30, 120, 30, "sin"],
          [160, 50, 160, 50, "dex"]]

for arrow in arrows:
    strike = arrow[0] - 90
    ax.plane(strike, arrow[1], color="#000000")
    ax.line(arrow[3], arrow[2], color="#ff0000")

    x, y = mplstereonet.line(arrow[3], arrow[2])
    ang = np.degrees(np.arctan2(x, y))[0] * (-1)
    gap = 0.08
    gap_x = gap * np.sin(ang)
    gap_y = gap * np.cos(ang)

    if arrow[4] == "dex":
        ax.text(x - gap_x, y - gap_y, "⇀", size=30, rotation=ang,
                horizontalalignment="center", verticalalignment="center")
        ax.text(x + gap_x, y + gap_y, "↽", size=30, rotation=ang,
                horizontalalignment="center", verticalalignment="center")

    elif arrow[4] == "sin":
        ax.text(x - gap_x, y - gap_y, "↼", size=30, rotation=ang,
                horizontalalignment="center", verticalalignment="center")
        ax.text(x + gap_x, y + gap_y, "⇁", size=30, rotation=ang,
                horizontalalignment="center", verticalalignment="center")

plt.show()

Related questions:

+4
source share
1

: arrowprops=dict().


, 7 (!) , (Arrow, FancyArrow, FancyArrowPatch, ConnectionPatch, YAArrow, SimpleArrow ( FancyArrowPatch) FilledArrow). - .

, , PolyCollection.

.

, :

[...] , , API .

annotate, .

+2

All Articles