diff options
author | Tyler Reddy <tyler.je.reddy@gmail.com> | 2019-01-02 11:12:00 -0800 |
---|---|---|
committer | Tyler Reddy <tyler.je.reddy@gmail.com> | 2019-01-02 11:12:00 -0800 |
commit | a5078dcd66590d5e127b99b74e86f3d27cc75913 (patch) | |
tree | f28925dde0c04b2f1925aaea088629b555b83d8e /numpy/lib/twodim_base.py | |
parent | 49a798c27d08f244207829c57d9621c9514e8c82 (diff) | |
download | numpy-a5078dcd66590d5e127b99b74e86f3d27cc75913.tar.gz |
DOC, TST: clean up matplotlib imports
* as requested by review in gh-12634,
the vast majority of docstring matplotlib
imports can be simplified to a single line
Diffstat (limited to 'numpy/lib/twodim_base.py')
-rw-r--r-- | numpy/lib/twodim_base.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/numpy/lib/twodim_base.py b/numpy/lib/twodim_base.py index aa57911bb..e165c9b02 100644 --- a/numpy/lib/twodim_base.py +++ b/numpy/lib/twodim_base.py @@ -644,9 +644,7 @@ def histogram2d(x, y, bins=10, range=None, normed=None, weights=None, Examples -------- - >>> import matplotlib - >>> import matplotlib.pyplot - >>> import matplotlib as mpl + >>> from matplotlib.image import NonUniformImage >>> import matplotlib.pyplot as plt Construct a 2-D histogram with variable bin width. First define the bin @@ -683,7 +681,7 @@ def histogram2d(x, y, bins=10, range=None, normed=None, weights=None, >>> ax = fig.add_subplot(133, title='NonUniformImage: interpolated', ... aspect='equal', xlim=xedges[[0, -1]], ylim=yedges[[0, -1]]) - >>> im = mpl.image.NonUniformImage(ax, interpolation='bilinear') + >>> im = NonUniformImage(ax, interpolation='bilinear') >>> xcenters = (xedges[:-1] + xedges[1:]) / 2 >>> ycenters = (yedges[:-1] + yedges[1:]) / 2 >>> im.set_data(xcenters, ycenters, H) |