I'm new to matprotlib. After plotting a graph I would like to mark a point. I do this with the following code:
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.scatter(3, 2, s=500, edgecolor='#ff575a', lw=2, facecolor='none', alpha=0.5, zorder=1) #6.5-row['mag']
ax.plot([1, 2, 3, 4], [1, 4, 2, 3])
The output:
Instead of the symmetric red circle is it possible to make a custom shape handwriting style? Something like this one:
I have tried to use the AnnotationBbox
insted of ax.scatter:
ab = AnnotationBbox(OffsetImage(plt.imread('circle.png'),
zoom=0.2), (3, 2), frameon=False)
But that make the picture bad with some pixels of the circle missing, so it is not that sharp as the original png: