I would like to specify the text of my contour label (instead of the value of the contour I want to put a text) I've tried:
CS = contour(X, Y, Z, [0.5], linewidths=1, colors='k')
plt.clabel(CS, fontsize=10, inline=1, text=r'$\alpha=0$')
but it doesn't work. Any idea?
Click the first button near a contour to add a label, click the second button (or potentially both mouse buttons at once) to finish adding labels. The third button can be used to remove the last label added, but only if labels are not inline.
Try this:
plt.clabel(CS, fontsize=10, inline=1, fmt=r'$\alpha=0$')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With