summaryrefslogtreecommitdiff
path: root/numpy/lib/twodim_base.py
diff options
context:
space:
mode:
authorSebastian Berg <sebastianb@nvidia.com>2023-02-14 19:52:18 +0100
committerGitHub <noreply@github.com>2023-02-14 19:52:18 +0100
commit482d3fadbfe23a1d2a2bb179e90369e0d08b11be (patch)
treedd15ec4c31145124f4b20aefa0189ac19bd3a6a4 /numpy/lib/twodim_base.py
parent80d5aeb986a885b8cc43b27839477a15677bcac8 (diff)
downloadnumpy-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/twodim_base.py')
-rw-r--r--numpy/lib/twodim_base.py2
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