diff options
author | Sebastian Berg <sebastianb@nvidia.com> | 2023-02-14 19:52:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-14 19:52:18 +0100 |
commit | 482d3fadbfe23a1d2a2bb179e90369e0d08b11be (patch) | |
tree | dd15ec4c31145124f4b20aefa0189ac19bd3a6a4 /numpy/lib | |
parent | 80d5aeb986a885b8cc43b27839477a15677bcac8 (diff) | |
download | numpy-482d3fadbfe23a1d2a2bb179e90369e0d08b11be.tar.gz |
DOC: Fix matpltolib error in documentation (#23212)
As noted by Kyle Sunden, this was deprecated and has been removed,
using the method is the correct way of doing it in newer matplotlib.
Closes gh-23209
Co-authored-by: Kyle Sunden <ksunden@users.noreply.github.com>
Diffstat (limited to 'numpy/lib')
-rw-r--r-- | numpy/lib/twodim_base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/twodim_base.py b/numpy/lib/twodim_base.py index ed4f98704..6dcb65651 100644 --- a/numpy/lib/twodim_base.py +++ b/numpy/lib/twodim_base.py @@ -754,7 +754,7 @@ def histogram2d(x, y, bins=10, range=None, density=None, weights=None): >>> xcenters = (xedges[:-1] + xedges[1:]) / 2 >>> ycenters = (yedges[:-1] + yedges[1:]) / 2 >>> im.set_data(xcenters, ycenters, H) - >>> ax.images.append(im) + >>> ax.add_image(im) >>> plt.show() It is also possible to construct a 2-D histogram without specifying bin |