October 2018
Beginner to intermediate
676 pages
18h 30m
English
The following code block plots two axes, four points, and the connectivity between them. This is a kind of annotation without any text:
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(6, 3))
pointA = (0.2, 0.2)pointB = (0.8, 0.8)coordsA = "data"coordsB = "data"
con = ConnectionPatch(pointA, pointB, coordsA, coordsB, arrowstyle="fancy", shrinkA=5, shrinkB=5, fc="k")
ax1.plot([pointA[0], pointB[0]], [pointA[1], pointB[1]], "o")
ax1.add_artist(con)
Read now
Unlock full access