Skip to content
Merged
Changes from all commits
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
6 changes: 3 additions & 3 deletions lib/matplotlib/backends/backend_wx.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,14 +694,14 @@ def _onSize(self, event):
# no change in size
return
self._width, self._height = size
# Create a new, correctly sized bitmap
self.bitmap = wx.Bitmap(self._width, self._height)

self._isDrawn = False

if self._width <= 1 or self._height <= 1:
return # Empty figure

# Create a new, correctly sized bitmap
self.bitmap = wx.Bitmap(self._width, self._height)

dpival = self.figure.dpi
winch = self._width / dpival
hinch = self._height / dpival
Expand Down