You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Version 2.0.0b1.post7580.dev0+ge487118
matplotlib
Fork me on GitHub

This Page

matplotlib.backends.backend_tkagg

class matplotlib.backends.backend_tkagg.AxisMenu(master, naxes)

Bases: object

adjust(naxes)
get_indices()
invert_all()
select_all()
set_active()
class matplotlib.backends.backend_tkagg.ConfigureSubplotsTk(*args, **kwargs)

Bases: matplotlib.backend_tools.ConfigureSubplotsBase

destroy(*args, **kwargs)
init_window()
trigger(*args)
matplotlib.backends.backend_tkagg.FigureCanvas

alias of FigureCanvasTkAgg

class matplotlib.backends.backend_tkagg.FigureCanvasTkAgg(figure, master=None, resize_callback=None)

Bases: matplotlib.backends.backend_agg.FigureCanvasAgg

blit(bbox=None)
button_dblclick_event(event)
button_press_event(event, dblclick=False)
button_release_event(event)
draw()
draw_idle()

update drawing area only if idle

flush_events()
get_tk_widget()

returns the Tk widget used to implement FigureCanvasTkAgg. Although the initial implementation uses a Tk canvas, this routine is intended to hide that fact.

key_press(event)
key_release(event)
keyvald = {65507: 'control', 65505: 'shift', 65513: 'alt', 65515: 'super', 65508: 'control', 65506: 'shift', 65514: 'alt', 65361: 'left', 65362: 'up', 65363: 'right', 65364: 'down', 65307: 'escape', 65470: 'f1', 65471: 'f2', 65472: 'f3', 65473: 'f4', 65474: 'f5', 65475: 'f6', 65476: 'f7', 65477: 'f8', 65478: 'f9', 65479: 'f10', 65480: 'f11', 65481: 'f12', 65300: 'scroll_lock', 65299: 'break', 65288: 'backspace', 65293: 'enter', 65379: 'insert', 65535: 'delete', 65360: 'home', 65367: 'end', 65365: 'pageup', 65366: 'pagedown', 65438: '0', 65436: '1', 65433: '2', 65435: '3', 65430: '4', 65437: '5', 65432: '6', 65429: '7', 65431: '8', 65434: '9', 65451: '+', 65453: '-', 65450: '*', 65455: '/', 65439: 'dec', 65421: 'enter'}
motion_notify_event(event)
new_timer(*args, **kwargs)

Creates a new backend-specific subclass of backend_bases.Timer. This is useful for getting periodic events through the backend’s native event loop. Implemented only for backends with GUIs.

Other Parameters:
 

interval : scalar

Timer interval in milliseconds

callbacks : list

Sequence of (func, args, kwargs) where func(*args, **kwargs) will be executed by the timer every interval.

resize(event)
scroll_event(event)
scroll_event_windows(event)

MouseWheel event processor

show()

Deprecated since version 2.2: The FigureCanvasTkAgg.show function was deprecated in version 2.2. Use FigureCanvasTkAgg.draw instead.

matplotlib.backends.backend_tkagg.FigureManager

alias of FigureManagerTkAgg

class matplotlib.backends.backend_tkagg.FigureManagerTkAgg(canvas, num, window)

Bases: matplotlib.backend_bases.FigureManagerBase

Attributes

canvas (FigureCanvas) The FigureCanvas instance
num (int or str) The Figure number
toolbar (tk.Toolbar) The tk.Toolbar
window (tk.Window) The tk.Window
destroy(*args)
full_screen_toggle()
get_window_title()
resize(width, height=None)
set_window_title(title)
show()

this function doesn’t segfault but causes the PyEval_RestoreThread: NULL state bug on win32

class matplotlib.backends.backend_tkagg.NavigationToolbar2TkAgg(canvas, window)

Bases: matplotlib.backend_bases.NavigationToolbar2, tkinter.Frame

Attributes

canvas (FigureCanvas) the figure canvas on which to operate
win (tk.Window) the tk.Window which owns this toolbar
configure_subplots()
destroy(*args)
draw_rubberband(event, x0, y0, x1, y1)
release(event)
save_figure(*args)
set_active(ind)
set_cursor(cursor)
set_message(s)
update()
class matplotlib.backends.backend_tkagg.RubberbandTk(*args, **kwargs)

Bases: matplotlib.backend_tools.RubberbandBase

draw_rubberband(x0, y0, x1, y1)
remove_rubberband()
class matplotlib.backends.backend_tkagg.SaveFigureTk(toolmanager, name)

Bases: matplotlib.backend_tools.SaveFigureBase

trigger(*args)
class matplotlib.backends.backend_tkagg.SetCursorTk(*args, **kwargs)

Bases: matplotlib.backend_tools.SetCursorBase

set_cursor(cursor)
class matplotlib.backends.backend_tkagg.StatusbarTk(window, *args, **kwargs)

Bases: matplotlib.backend_bases.StatusbarBase, tkinter.Frame

set_message(s)
class matplotlib.backends.backend_tkagg.TimerTk(parent, *args, **kwargs)

Bases: matplotlib.backend_bases.TimerBase

Subclass of backend_bases.TimerBase that uses Tk’s timer events.

Attributes

interval (int) The time between timer events in milliseconds. Default is 1000 ms.
single_shot (bool) Boolean flag indicating whether this timer should operate as single shot (run once and then stop). Defaults to False.
callbacks (list) Stores list of (func, args) tuples that will be called upon timer events. This list can be manipulated directly, or the functions add_callback and remove_callback can be used.
class matplotlib.backends.backend_tkagg.ToolTip(widget)

Bases: object

Tooltip recipe from http://www.voidspace.org.uk/python/weblog/arch_d7_2006_07_01.shtml#e387

static createToolTip(widget, text)
hidetip()
showtip(text)

Display text in tooltip window

matplotlib.backends.backend_tkagg.Toolbar

alias of ToolbarTk

class matplotlib.backends.backend_tkagg.ToolbarTk(toolmanager, window)

Bases: matplotlib.backend_bases.ToolContainerBase, tkinter.Frame

add_toolitem(name, group, position, image_file, description, toggle)
remove_toolitem(name)
toggle_toolitem(name, toggled)
matplotlib.backends.backend_tkagg.error_msg_tkpaint(msg, parent=None)
matplotlib.backends.backend_tkagg.new_figure_manager_given_figure(num, figure)

Create a new figure manager instance for the given figure.

matplotlib.backends.backend_tkagg.raise_msg_to_str(msg)

msg is a return arg from a raise. Join with new lines