matplotlib.backends.backend_nbagg#

Interactive figures in the IPython notebook.

classmatplotlib.backends.backend_nbagg.CommSocket(manager)[source]#

Bases:object

Manages the Comm connection between IPython and the browser (client).

Comms are 2 way, with the CommSocket being able to publish a messagevia the send_json method, and handle a message with on_message. On theJS side figure.send_message and figure.ws.onmessage do the sending andreceiving respectively.

is_open()[source]#
on_close()[source]#
on_message(message)[source]#
send_binary(blob)[source]#
send_json(content)[source]#
matplotlib.backends.backend_nbagg.FigureCanvas[source]#

alias ofFigureCanvasNbAgg

classmatplotlib.backends.backend_nbagg.FigureCanvasNbAgg(*args,**kwargs)[source]#

Bases:FigureCanvasWebAggCore

manager_class[source]#

alias ofFigureManagerNbAgg

matplotlib.backends.backend_nbagg.FigureManager[source]#

alias ofFigureManagerNbAgg

classmatplotlib.backends.backend_nbagg.FigureManagerNbAgg(canvas,num)[source]#

Bases:FigureManagerWebAgg

ToolbarCls[source]#

alias ofNavigationIPy

clearup_closed()[source]#

Clear up any closed Comms.

propertyconnected#
classmethodcreate_with_canvas(canvas_class,figure,num)[source]#

Create a manager for a givenfigure using a specificcanvas_class.

Backends should override this method if they have specific needs forsetting up the canvas or the manager.

destroy()[source]#
display_js()[source]#
classmethodget_javascript(stream=None)[source]#
remove_comm(comm_id)[source]#
reshow()[source]#

A special method to re-show the figure in the notebook.

show()[source]#

For GUI backends, show the figure window and redraw.For non-GUI backends, raise an exception, unless running headless (i.e.on Linux with an unset DISPLAY); this exception is converted to awarning inFigure.show.

classmatplotlib.backends.backend_nbagg.NavigationIPy(canvas)[source]#

Bases:NavigationToolbar2WebAgg

toolitems=[('Home','Resetoriginalview','fafa-home','home'),('Back','Backtopreviousview','fafa-arrow-left','back'),('Forward','Forwardtonextview','fafa-arrow-right','forward'),(None,None,None,None),('Pan','Leftbuttonpans,Rightbuttonzooms\nx/yfixesaxis,CTRLfixesaspect','fafa-arrows','pan'),('Zoom','Zoomtorectangle\nx/yfixesaxis','fafa-square-o','zoom'),(None,None,None,None),('Download','Downloadplot','fafa-floppy-o','download')]#
matplotlib.backends.backend_nbagg.connection_info()[source]#

Return a string showing the figure and connection status for the backend.

This is intended as a diagnostic tool, and not for general use.