Mit this solution als Basis, ist es möglich, mehrere Pfeile aus der gleichen Quelle zu verschiedenen Zielen zu erstellen? z.B. Delhi -> Peking (116.4, 39.9), Delhi -> Kairo (30.0, 31.2), Delhi -> Tokio (35.6, 139.6)?Cartopy - mehrere Pfeile mit Anmerkungen
Wenn ich den Code unten wiederhole, bekomme ich nur den ersten Pfeil.
#Dehli - Beijing
ax.annotate('Beijing', xy=(116.4, 39.9), xycoords=transform,
size=40,
)
ax.annotate('Delhi', xy=(113, 40.5), xytext=(77.23, 28.61),
size=40,
arrowprops=dict(facecolor='red', ec = 'none',
arrowstyle="fancy",
connectionstyle="arc3,rad=-0.2",
),
xycoords=transform,
)
#Dehli - Cairo
ax.annotate('Cairo', xy=(-6.26, 53.34), xycoords=transform,
size=40,
)
ax.annotate('Delhi', xy=(113, 40.5), xytext=(77.23, 28.61),
size=40,
arrowprops=dict(facecolor='red', ec = 'none',
arrowstyle="fancy",
connectionstyle="arc3,rad=-0.2",
),
xycoords=transform,
)
Alternativ ist es eine Möglichkeit, .annotate in diesen Ausdruck zu bringen, die ich gegenwärtig bin mit Verbindungslinien zu zeichnen. Ich habe ohne Erfolg versucht:
#Coordinates
lon_dehl, lat_dehl = 116.4, 39.9
lon_beij, lat_beij = 77.59, 12.97
lon_toky, lat_toky = 35.6, 139.6
lon_cair, lat_cair = 30.0, 31.2
plt.plot([lon_dehl, lon_beij], [lat_dehl, lat_beij],
linewidth=2,
linestyle='solid',
solid_capstyle='round',
color='#cb2c31',
marker='o',
markersize=6,
markeredgewidth=None,
markeredgecolor='#cb2c31',
transform=ccrs.PlateCarree(),
)