def _onSize(self, evt):
DEBUG_MSG("<STR_LIT>", <NUM_LIT:2>, self)<EOL>self._width, self._height = self.GetClientSize()<EOL>self.bitmap =wx.EmptyBitmap(self._width, self._height)<EOL>self._isDrawn = False<EOL>if self._width <= <NUM_LIT:1> or self._height <= <NUM_LIT:1>: return <EOL>dpival = self.figure.dpi<EOL>winch = self._width/dpival<EOL>hinch = self._height/dpival<EOL>self.figure.set_size_inches(winch, hinch)<EOL>self.Refresh(eraseBackground=False)<EOL>
Called when wxEventSize is generated.

In this application we attempt to resize to fit the window, so it
is better to take the performance hit and redraw the whole window.