8000 Fix and classify equal aspect ratio.py by ericmjl · Pull Request #4628 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Fix and classify equal aspect ratio.py #4628

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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.
  • Loading branch information
ericmjl committed Jul 11, 2015
commit 0a5314a5128f2a84a56b894677aea1a9122c4f7a
8 changes: 4 additions & 4 deletions examples/pylab_examples/contourf_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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()
0