Skip to content

Instantly share code, notes, and snippets.

@abhishek-shrm
Created May 4, 2020 05:21
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
fig=plt.figure(figsize=(8,6))
plt.plot(X,np.exp(X))
plt.title('Annotating Exponential Plot using plt.annotate()')
plt.xlabel('x-axis')
plt.ylabel('y-axis')
plt.annotate('Point 1',xy=(6,400),arrowprops=dict(arrowstyle='->'),xytext=(4,600))
plt.annotate('Point 2',xy=(7,1150),arrowprops=dict(arrowstyle='->',connectionstyle='arc3,rad=-.2'),xytext=(4.5,2000))
plt.annotate('Point 3',xy=(8,3000),arrowprops=dict(arrowstyle='-|>',connectionstyle='angle,angleA=90,angleB=0'),xytext=(8.5,2200))
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment