First page Back Continue Last page Overview Graphics

Annotations

It's possible to annotate certain points by applying the annotate function.

x = 3 * np.pi / 4

Plot vertical line:

plot([x,x],[0,3 * np.sin(x)], color ='blue', linewidth=2.5, linestyle="--")

Print the blue dot:

scatter([x,],[3 * np.sin(x),], 50, color ='blue')

annotate(r'$3\sin(\frac{3\pi}{4})=\frac{3}{\sqrt{2}}$',

xy=(x, 3 * np.sin(x)),

xycoords='data',

xytext=(+10, +30),

textcoords='offset points',

fontsize=16)