Re: [Matplotlib-users] countour plot custom labels

2009-12-02 Thread Jae-Joon Lee
This would only meaningful if you set contour levels manually. plt.figure() levels = [-1, 0, 1] fmt = {-1.:"-1", 0.:"0", 1.:"+1"} CS = plt.contour(X, Y, Z, levels) plt.clabel(CS, inline=1, fontsize=10, fmt=fmt) Regards, -JJ On Wed, Dec 2, 2009 at 6:32 AM, Momme Butenschön wrote:

[Matplotlib-users] countour plot custom labels

2009-12-02 Thread Momme Butenschön
in the help for the countour plot labeling it says: *fmt*: a format string for the label. Default is '%1.3f' Alternatively, this can be a dictionary matching contour levels with arbitrary strings to use for each contour level (i.e., fmt[level]=string) can someb