def CopyImage(canvas):
    """
    Copy the MPL canvas to the wx clipboard.
    """
    import wx
    bmp = wx.BitmapDataObject()
    bmp.SetBitmap(canvas.bitmap)
    wx.TheClipboard.Open()
    wx.TheClipboard.SetData(bmp)
    wx.TheClipboard.Close()
