diff --git a/examples/images_contours_and_fields/contour_demo.py b/examples/images_contours_and_fields/contour_demo.py index 763b0789a870..2c9881c83fe1 100644 --- a/examples/images_contours_and_fields/contour_demo.py +++ b/examples/images_contours_and_fields/contour_demo.py @@ -31,7 +31,7 @@ fig, ax = plt.subplots() CS = ax.contour(X, Y, Z) -ax.clabel(CS, inline=1, fontsize=10) +ax.clabel(CS, inline=True, fontsize=10) ax.set_title('Simplest default with labels') ############################################################################### @@ -43,7 +43,7 @@ CS = ax.contour(X, Y, Z) manual_locations = [ (-1, -1.4), (-0.62, -0.7), (-2, 0.5), (1.7, 1.2), (2.0, 1.4), (2.4, 1.7)] -ax.clabel(CS, inline=1, fontsize=10, manual=manual_locations) +ax.clabel(CS, inline=True, fontsize=10, manual=manual_locations) ax.set_title('labels at selected locations') ############################################################################### @@ -51,7 +51,7 @@ fig, ax = plt.subplots() CS = ax.contour(X, Y, Z, 6, colors='k') # Negative contours default to dashed. -ax.clabel(CS, fontsize=9, inline=1) +ax.clabel(CS, fontsize=9, inline=True) ax.set_title('Single color - negative contours dashed') ############################################################################### @@ -60,7 +60,7 @@ matplotlib.rcParams['contour.negative_linestyle'] = 'solid' fig, ax = plt.subplots() CS = ax.contour(X, Y, Z, 6, colors='k') # Negative contours default to dashed. -ax.clabel(CS, fontsize=9, inline=1) +ax.clabel(CS, fontsize=9, inline=True) ax.set_title('Single color - negative contours solid') ############################################################################### @@ -71,7 +71,7 @@ linewidths=np.arange(.5, 4, .5), colors=('r', 'green', 'blue', (1, 1, 0), '#afeeee', '0.5'), ) -ax.clabel(CS, fontsize=9, inline=1) +ax.clabel(CS, fontsize=9, inline=True) ax.set_title('Crazy lines') ############################################################################### @@ -90,7 +90,7 @@ plt.setp(zc, linewidth=4) ax.clabel(CS, levels[1::2], # label every second level - inline=1, fmt='%1.1f', fontsize=14) + inline=True, fmt='%1.1f', fontsize=14) # make a colorbar for the contour lines CB = fig.colorbar(CS, shrink=0.8) diff --git a/examples/misc/demo_agg_filter.py b/examples/misc/demo_agg_filter.py index 80dde60de314..94379b214946 100644 --- a/examples/misc/demo_agg_filter.py +++ b/examples/misc/demo_agg_filter.py @@ -170,7 +170,7 @@ def filtered_text(ax): # contour label cl = ax.clabel(CS, levels[1::2], # label every second level - inline=1, + inline=True, fmt='%1.1f', fontsize=11) diff --git a/examples/mplot3d/contour3d.py b/examples/mplot3d/contour3d.py index a740c30376c1..8ae9deb54981 100644 --- a/examples/mplot3d/contour3d.py +++ b/examples/mplot3d/contour3d.py @@ -18,6 +18,6 @@ # Plot contour curves cset = ax.contour(X, Y, Z, cmap=cm.coolwarm) -ax.clabel(cset, fontsize=9, inline=1) +ax.clabel(cset, fontsize=9, inline=True) plt.show() diff --git a/examples/mplot3d/contour3d_2.py b/examples/mplot3d/contour3d_2.py index b77b2bdc0557..686fc4aa39f0 100644 --- a/examples/mplot3d/contour3d_2.py +++ b/examples/mplot3d/contour3d_2.py @@ -17,6 +17,6 @@ cset = ax.contour(X, Y, Z, extend3d=True, cmap=cm.coolwarm) -ax.clabel(cset, fontsize=9, inline=1) +ax.clabel(cset, fontsize=9, inline=True) plt.show() diff --git a/examples/mplot3d/contourf3d.py b/examples/mplot3d/contourf3d.py index 81c058905930..1fcfe5c634bf 100644 --- a/examples/mplot3d/contourf3d.py +++ b/examples/mplot3d/contourf3d.py @@ -20,6 +20,6 @@ cset = ax.contourf(X, Y, Z, cmap=cm.coolwarm) -ax.clabel(cset, fontsize=9, inline=1) +ax.clabel(cset, fontsize=9, inline=True) plt.show()