diff --git a/examples/pylab_examples/contourf_log.py b/examples/images_contours_and_fields/contourf_log.py similarity index 89% rename from examples/pylab_examples/contourf_log.py rename to examples/images_contours_and_fields/contourf_log.py index ceea635c3e95..c64b0b708eb3 100644 --- a/examples/pylab_examples/contourf_log.py +++ b/examples/images_contours_and_fields/contourf_log.py @@ -2,7 +2,7 @@ Demonstrate use of a log color scale in contourf ''' -from matplotlib import pyplot as P +import matplotlib.pyplot as plt import numpy as np from numpy import ma from matplotlib import colors, ticker, cm @@ -30,7 +30,7 @@ # Automatic selection of levels works; setting the # log locator tells contourf to use a log scale: -cs = P.contourf(X, Y, z, locator=ticker.LogLocator(), cmap=cm.PuBu_r) +cs = plt.contourf(X, Y, z, locator=ticker.LogLocator(), cmap=cm.PuBu_r) # Alternatively, you can manually set the levels # and the norm: @@ -41,6 +41,6 @@ # The 'extend' kwarg does not work yet with a log scale. -cbar = P.colorbar() +cbar = plt.colorbar() -P.show() +plt.show()