Contour labelling on filled contours#

Using clabel to label filled contours created with contourf is deprecated. clabel() is designed to label contour lines (Axes.contour), and using it with filled contours can lead to inconsistent plots. If you want to add labels to filled contours, the recommended approach is to first create the filled contours with contourf, then overlay contour lines using contour, and finally apply clabel to those contour lines for labeling. For an example see Contourf demo.