Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0a5314a

Browse files
committed
In coutourf_log.py, changed P. to plt.
Originally had: `from matplotlib import pyplot as P`. Changed to: `import matplotlib.pyplot as plt`. In later lines, changed all `P.function()`s to `plt.function()`s.
1 parent 63efe32 commit 0a5314a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/pylab_examples/contourf_log.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Demonstrate use of a log color scale in contourf
33
'''
44

5-
from matplotlib import pyplot as P
5+
import matplotlib.pyplot as plt
66
import numpy as np
77
from numpy import ma
88
from matplotlib import colors, ticker, cm
@@ -30,7 +30,7 @@
3030

3131
# Automatic selection of levels works; setting the
3232
# log locator tells contourf to use a log scale:
33-
cs = P.contourf(X, Y, z, locator=ticker.LogLocator(), cmap=cm.PuBu_r)
33+
cs = plt.contourf(X, Y, z, locator=ticker.LogLocator(), cmap=cm.PuBu_r)
3434

3535
# Alternatively, you can manually set the levels
3636
# and the norm:
@@ -41,6 +41,6 @@
4141

4242
# The 'extend' kwarg does not work yet with a log scale.
4343

44-
cbar = P.colorbar()
44+
cbar = plt.colorbar()
4545

46-
P.show()
46+
plt.show()

0 commit comments

Comments
 (0)