You are reading an old version of the documentation (v2.2.3). For the latest version see
Version 2.2.3
Fork me on GitHub

Source code for matplotlib.backends.backend_tkagg

from __future__ import absolute_import, division, print_function

from .. import cbook
from . import tkagg  # Paint image to Tk photo blitter extension.
from .backend_agg import FigureCanvasAgg
from ._backend_tk import (
    _BackendTk, FigureCanvasTk, FigureManagerTk, NavigationToolbar2Tk)

[docs]class FigureCanvasTkAgg(FigureCanvasAgg, FigureCanvasTk):
[docs] def draw(self): super(FigureCanvasTkAgg, self).draw() tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2) self._master.update_idletasks()
[docs] def blit(self, bbox=None): tkagg.blit( self._tkphoto, self.renderer._renderer, bbox=bbox, colormode=2) self._master.update_idletasks()
[docs]@cbook.deprecated("2.2") class FigureManagerTkAgg(FigureManagerTk): pass
@_BackendTk.export class _BackendTkAgg(_BackendTk): FigureCanvas = FigureCanvasTkAgg