Skip to content

Commit

Permalink
wxGUI/iclass: fix showing scatter plots (OSGeo#3169)
Browse files Browse the repository at this point in the history
Compatible with Matplotlib v3.
  • Loading branch information
tmszi authored Sep 22, 2023
1 parent 6c69587 commit 59b3f9f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions gui/wxpython/iscatt/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -1019,8 +1019,7 @@ def imshow(
@author: Chris Beaumont <[email protected]>
"""

if not axes._hold:
axes.cla()
axes.cla()
if norm is not None:
assert isinstance(norm, mcolors.Normalize)
if aspect is None:
Expand Down Expand Up @@ -1069,7 +1068,7 @@ def imshow(
# to tightly fit the image, regardless of dataLim.
im.set_extent(im.get_extent())

axes.images.append(im)
axes.add_image(im)
im._remove_method = lambda h: axes.images.remove(h)

return im

0 comments on commit 59b3f9f

Please sign in to comment.