开发者

Changing the text of clabel in Matplotlib

I would like to specify the text of my contour lab开发者_运维百科el (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?


Try this:

plt.clabel(CS, fontsize=10, inline=1, fmt=r'$\alpha=0$')
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜