Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0a5314a

Browse filesBrowse 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
Copy full SHA for 0a5314a

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎examples/pylab_examples/contourf_log.py

Copy file name to clipboardExpand all lines: examples/pylab_examples/contourf_log.py
+4-4Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.