doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
classmatplotlib.backend_tools.ToolHome(toolmanager, name)[source] Bases: matplotlib.backend_tools.ViewsPositionsBase Restore the original view limits. default_keymap=['h', 'r', 'home'] Keymap to associate with this tool. list[str]: List of keys that will trigger this tool when a keypress event is emitted on self....
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolHome
default_keymap=['h', 'r', 'home'] Keymap to associate with this tool. list[str]: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolHome.default_keymap
description='Reset original view' Description of the Tool. str: Tooltip used if the Tool is included in a Toolbar.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolHome.description
image='home' Filename of the image. str: Filename of the image to use in a Toolbar. If None, the name is used as a label in the toolbar button.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolHome.image
classmatplotlib.backend_tools.ToolMinorGrid(toolmanager, name)[source] Bases: matplotlib.backend_tools.ToolBase Tool to toggle the major and minor grids of the figure. default_keymap=['G'] Keymap to associate with this tool. list[str]: List of keys that will trigger this tool when a keypress event is emitted on s...
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolMinorGrid
default_keymap=['G'] Keymap to associate with this tool. list[str]: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolMinorGrid.default_keymap
description='Toggle major and minor grids' Description of the Tool. str: Tooltip used if the Tool is included in a Toolbar.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolMinorGrid.description
trigger(sender, event, data=None)[source] Called when this tool gets used. This method is called by ToolManager.trigger_tool. Parameters eventEvent The canvas event that caused this tool to be called. senderobject Object that requested the tool to be triggered. dataobject Extra data.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolMinorGrid.trigger
classmatplotlib.backend_tools.ToolPan(*args)[source] Bases: matplotlib.backend_tools.ZoomPanBase Pan axes with left mouse, zoom with right. cursor=4[source] Cursor to use when the tool is active. default_keymap=['p'] Keymap to associate with this tool. list[str]: List of keys that will trigger this tool whe...
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolPan
cursor=4[source] Cursor to use when the tool is active.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolPan.cursor
default_keymap=['p'] Keymap to associate with this tool. list[str]: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolPan.default_keymap
description='Pan axes with left mouse, zoom with right' Description of the Tool. str: Tooltip used if the Tool is included in a Toolbar.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolPan.description
image='move' Filename of the image. str: Filename of the image to use in a Toolbar. If None, the name is used as a label in the toolbar button.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolPan.image
radio_group='default' Attribute to group 'radio' like tools (mutually exclusive). str that identifies the group or None if not belonging to a group.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolPan.radio_group
classmatplotlib.backend_tools.ToolQuit(toolmanager, name)[source] Bases: matplotlib.backend_tools.ToolBase Tool to call the figure manager destroy method. default_keymap=['ctrl+w', 'cmd+w', 'q'] Keymap to associate with this tool. list[str]: List of keys that will trigger this tool when a keypress event is emitte...
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolQuit
default_keymap=['ctrl+w', 'cmd+w', 'q'] Keymap to associate with this tool. list[str]: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolQuit.default_keymap
description='Quit the figure' Description of the Tool. str: Tooltip used if the Tool is included in a Toolbar.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolQuit.description
trigger(sender, event, data=None)[source] Called when this tool gets used. This method is called by ToolManager.trigger_tool. Parameters eventEvent The canvas event that caused this tool to be called. senderobject Object that requested the tool to be triggered. dataobject Extra data.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolQuit.trigger
classmatplotlib.backend_tools.ToolQuitAll(toolmanager, name)[source] Bases: matplotlib.backend_tools.ToolBase Tool to call the figure manager destroy method. default_keymap=[] Keymap to associate with this tool. list[str]: List of keys that will trigger this tool when a keypress event is emitted on self.figure.ca...
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolQuitAll
default_keymap=[] Keymap to associate with this tool. list[str]: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolQuitAll.default_keymap
description='Quit all figures' Description of the Tool. str: Tooltip used if the Tool is included in a Toolbar.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolQuitAll.description
trigger(sender, event, data=None)[source] Called when this tool gets used. This method is called by ToolManager.trigger_tool. Parameters eventEvent The canvas event that caused this tool to be called. senderobject Object that requested the tool to be triggered. dataobject Extra data.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolQuitAll.trigger
matplotlib.backend_tools.ToolSetCursor[source] alias of matplotlib.backend_tools.SetCursorBase
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolSetCursor
classmatplotlib.backend_tools.ToolToggleBase(*args, **kwargs)[source] Bases: matplotlib.backend_tools.ToolBase Toggleable tool. Every time it is triggered, it switches between enable and disable. Parameters ``*args`` Variable length argument to be used by the Tool. ``**kwargs`` toggled if present and True, sets...
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolToggleBase
cursor=None Cursor to use when the tool is active.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolToggleBase.cursor
default_toggled=False Default of toggled state.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolToggleBase.default_toggled
disable(event=None)[source] Disable the toggle tool. trigger call this method when toggled is True. This can happen in different circumstances. Click on the toolbar tool button. Call to matplotlib.backend_managers.ToolManager.trigger_tool. Another ToolToggleBase derived tool is triggered (from the same ToolManager).
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolToggleBase.disable
enable(event=None)[source] Enable the toggle tool. trigger calls this method when toggled is False.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolToggleBase.enable
radio_group=None Attribute to group 'radio' like tools (mutually exclusive). str that identifies the group or None if not belonging to a group.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolToggleBase.radio_group
set_figure(figure)[source]
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolToggleBase.set_figure
trigger(sender, event, data=None)[source] Calls enable or disable based on toggled value.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolToggleBase.trigger
classmatplotlib.backend_tools.ToolViewsPositions(*args, **kwargs)[source] Bases: matplotlib.backend_tools.ToolBase Auxiliary Tool to handle changes in views and positions. Runs in the background and should get used by all the tools that need to access the figure's history of views and positions, e.g. ToolZoom ToolPa...
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolViewsPositions
add_figure(figure)[source] Add the current figure to the stack of views and positions.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolViewsPositions.add_figure
back()[source] Back one step in the stack of views and positions.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolViewsPositions.back
clear(figure)[source] Reset the axes stack.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolViewsPositions.clear
forward()[source] Forward one step in the stack of views and positions.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolViewsPositions.forward
home()[source] Recall the first view and position from the stack.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolViewsPositions.home
push_current(figure=None)[source] Push the current view limits and position onto their respective stacks.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolViewsPositions.push_current
update_home_views(figure=None)[source] Make sure that self.home_views has an entry for all axes present in the figure.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolViewsPositions.update_home_views
update_view()[source] Update the view limits and position for each axes from the current stack position. If any axes are present in the figure that aren't in the current stack position, use the home view limits for those axes and don't update any positions.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolViewsPositions.update_view
classmatplotlib.backend_tools.ToolXScale(*args, **kwargs)[source] Bases: matplotlib.backend_tools.AxisScaleBase Tool to toggle between linear and logarithmic scales on the X axis. default_keymap=['k', 'L'] Keymap to associate with this tool. list[str]: List of keys that will trigger this tool when a keypress even...
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolXScale
default_keymap=['k', 'L'] Keymap to associate with this tool. list[str]: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolXScale.default_keymap
description='Toggle scale X axis' Description of the Tool. str: Tooltip used if the Tool is included in a Toolbar.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolXScale.description
set_scale(ax, scale)[source]
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolXScale.set_scale
classmatplotlib.backend_tools.ToolYScale(*args, **kwargs)[source] Bases: matplotlib.backend_tools.AxisScaleBase Tool to toggle between linear and logarithmic scales on the Y axis. default_keymap=['l'] Keymap to associate with this tool. list[str]: List of keys that will trigger this tool when a keypress event is ...
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolYScale
default_keymap=['l'] Keymap to associate with this tool. list[str]: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolYScale.default_keymap
description='Toggle scale Y axis' Description of the Tool. str: Tooltip used if the Tool is included in a Toolbar.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolYScale.description
set_scale(ax, scale)[source]
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolYScale.set_scale
classmatplotlib.backend_tools.ToolZoom(*args)[source] Bases: matplotlib.backend_tools.ZoomPanBase A Tool for zooming using a rectangle selector. cursor=3[source] Cursor to use when the tool is active. default_keymap=['o'] Keymap to associate with this tool. list[str]: List of keys that will trigger this too...
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolZoom
cursor=3[source] Cursor to use when the tool is active.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolZoom.cursor
default_keymap=['o'] Keymap to associate with this tool. list[str]: List of keys that will trigger this tool when a keypress event is emitted on self.figure.canvas.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolZoom.default_keymap
description='Zoom to rectangle' Description of the Tool. str: Tooltip used if the Tool is included in a Toolbar.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolZoom.description
image='zoom_to_rect' Filename of the image. str: Filename of the image to use in a Toolbar. If None, the name is used as a label in the toolbar button.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolZoom.image
radio_group='default' Attribute to group 'radio' like tools (mutually exclusive). str that identifies the group or None if not belonging to a group.
matplotlib.backend_tools_api#matplotlib.backend_tools.ToolZoom.radio_group
classmatplotlib.backend_tools.ViewsPositionsBase(toolmanager, name)[source] Bases: matplotlib.backend_tools.ToolBase Base class for ToolHome, ToolBack and ToolForward. trigger(sender, event, data=None)[source] Called when this tool gets used. This method is called by ToolManager.trigger_tool. Parameters event...
matplotlib.backend_tools_api#matplotlib.backend_tools.ViewsPositionsBase
trigger(sender, event, data=None)[source] Called when this tool gets used. This method is called by ToolManager.trigger_tool. Parameters eventEvent The canvas event that caused this tool to be called. senderobject Object that requested the tool to be triggered. dataobject Extra data.
matplotlib.backend_tools_api#matplotlib.backend_tools.ViewsPositionsBase.trigger
classmatplotlib.backend_tools.ZoomPanBase(*args)[source] Bases: matplotlib.backend_tools.ToolToggleBase Base class for ToolZoom and ToolPan. disable(event)[source] Release the canvas and disconnect press/release events. enable(event)[source] Connect press/release events and lock the canvas. scroll_zoom(...
matplotlib.backend_tools_api#matplotlib.backend_tools.ZoomPanBase
disable(event)[source] Release the canvas and disconnect press/release events.
matplotlib.backend_tools_api#matplotlib.backend_tools.ZoomPanBase.disable
enable(event)[source] Connect press/release events and lock the canvas.
matplotlib.backend_tools_api#matplotlib.backend_tools.ZoomPanBase.enable
scroll_zoom(event)[source]
matplotlib.backend_tools_api#matplotlib.backend_tools.ZoomPanBase.scroll_zoom
trigger(sender, event, data=None)[source] Calls enable or disable based on toggled value.
matplotlib.backend_tools_api#matplotlib.backend_tools.ZoomPanBase.trigger
backend_webagg Displays Agg images in the browser, with interactivity matplotlib.backends.backend_webagg.FigureCanvas[source] alias of matplotlib.backends.backend_webagg.FigureCanvasWebAgg classmatplotlib.backends.backend_webagg.FigureCanvasWebAgg(*args, **kwargs)[source] Bases: matplotlib.backends.backend_we...
matplotlib.backend_webagg_api
matplotlib.backends backend_mixed backend_template backend_agg backend_cairo backend_gtk3agg, backend_gtk3cairo backend_gtk4agg, backend_gtk4cairo backend_nbagg backend_pdf backend_pgf backend_ps backend_qtagg, backend_qtcairo backend_svg backend_tkagg, backend_tkcairo backend_webagg backend_wxagg, backend_wxcairo
matplotlib.index_backend_api
matplotlib.backends.backend_agg.FigureCanvas[source] alias of matplotlib.backends.backend_agg.FigureCanvasAgg
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.FigureCanvas
classmatplotlib.backends.backend_agg.FigureCanvasAgg(figure=None)[source] Bases: matplotlib.backend_bases.FigureCanvasBase buffer_rgba()[source] Get the image as a memoryview to the renderer's buffer. draw must be called at least once before this function will work and to update the renderer for any subsequent ch...
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.FigureCanvasAgg
buffer_rgba()[source] Get the image as a memoryview to the renderer's buffer. draw must be called at least once before this function will work and to update the renderer for any subsequent changes to the Figure.
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.FigureCanvasAgg.buffer_rgba
copy_from_bbox(bbox)[source]
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.FigureCanvasAgg.copy_from_bbox
draw()[source] Render the Figure. It is important that this method actually walk the artist tree even if not output is produced because this will trigger deferred work (like computing limits auto-limits and tick values) that users may want access to before saving to disk.
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.FigureCanvasAgg.draw
get_renderer(cleared=False)[source]
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.FigureCanvasAgg.get_renderer
print_jpeg(filename_or_obj, *args, pil_kwargs=None, **kwargs)[source] Write the figure to a JPEG file. Parameters filename_or_objstr or path-like or file-like The file to write to. Other Parameters pil_kwargsdict, optional Additional keyword arguments that are passed to PIL.Image.Image.save when saving ...
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.FigureCanvasAgg.print_jpeg
print_jpg(filename_or_obj, *args, pil_kwargs=None, **kwargs)[source] Write the figure to a JPEG file. Parameters filename_or_objstr or path-like or file-like The file to write to. Other Parameters pil_kwargsdict, optional Additional keyword arguments that are passed to PIL.Image.Image.save when saving t...
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.FigureCanvasAgg.print_jpg
print_png(filename_or_obj, *args, metadata=None, pil_kwargs=None)[source] Write the figure to a PNG file. Parameters filename_or_objstr or path-like or file-like The file to write to. metadatadict, optional Metadata in the PNG file as key-value pairs of bytes or latin-1 encodable strings. According to the P...
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.FigureCanvasAgg.print_png
print_raw(filename_or_obj, *args)[source]
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.FigureCanvasAgg.print_raw
print_rgba(filename_or_obj, *args)[source]
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.FigureCanvasAgg.print_rgba
print_tif(filename_or_obj, *, pil_kwargs=None)[source]
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.FigureCanvasAgg.print_tif
print_tiff(filename_or_obj, *, pil_kwargs=None)[source]
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.FigureCanvasAgg.print_tiff
print_to_buffer()[source]
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.FigureCanvasAgg.print_to_buffer
restore_region(region, bbox=None, xy=None)[source]
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.FigureCanvasAgg.restore_region
tostring_argb()[source] Get the image as ARGB bytes. draw must be called at least once before this function will work and to update the renderer for any subsequent changes to the Figure.
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.FigureCanvasAgg.tostring_argb
tostring_rgb()[source] Get the image as RGB bytes. draw must be called at least once before this function will work and to update the renderer for any subsequent changes to the Figure.
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.FigureCanvasAgg.tostring_rgb
matplotlib.backends.backend_agg.get_hinting_flag()[source]
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.get_hinting_flag
classmatplotlib.backends.backend_agg.RendererAgg(width, height, dpi)[source] Bases: matplotlib.backend_bases.RendererBase The renderer handles all the drawing primitives using a graphics context instance that controls the colors/styles buffer_rgba()[source] clear()[source] draw_mathtext(gc, x, y, s, prop, a...
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.RendererAgg
buffer_rgba()[source]
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.RendererAgg.buffer_rgba
clear()[source]
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.RendererAgg.clear
draw_mathtext(gc, x, y, s, prop, angle)[source] Draw mathtext using matplotlib.mathtext.
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.RendererAgg.draw_mathtext
draw_path(gc, path, transform, rgbFace=None)[source] Draw a Path instance using the given affine transform.
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.RendererAgg.draw_path
draw_tex(gc, x, y, s, prop, angle, *, mtext=None)[source]
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.RendererAgg.draw_tex
draw_text(gc, x, y, s, prop, angle, ismath=False, mtext=None)[source] Draw the text instance. Parameters gcGraphicsContextBase The graphics context. xfloat The x location of the text in display coords. yfloat The y location of the text baseline in display coords. sstr The text string. propmatplotl...
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.RendererAgg.draw_text
get_canvas_width_height()[source] Return the canvas width and height in display coords.
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.RendererAgg.get_canvas_width_height
get_content_extents()[source] [Deprecated] Notes Deprecated since version 3.4:
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.RendererAgg.get_content_extents
get_text_width_height_descent(s, prop, ismath)[source] Get the width, height, and descent (offset from the bottom to the baseline), in display coords, of the string s with FontProperties prop.
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.RendererAgg.get_text_width_height_descent
lock=<unlocked _thread.RLock object owner=0 count=0>
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.RendererAgg.lock
option_image_nocomposite()[source] Return whether image composition by Matplotlib should be skipped. Raster backends should usually return False (letting the C-level rasterizer take care of image composition); vector backends should usually return not rcParams["image.composite_image"].
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.RendererAgg.option_image_nocomposite
option_scale_image()[source] Return whether arbitrary affine transformations in draw_image() are supported (True for most vector backends).
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.RendererAgg.option_scale_image
points_to_pixels(points)[source] Convert points to display units. You need to override this function (unless your backend doesn't have a dpi, e.g., postscript or svg). Some imaging systems assume some value for pixels per inch: points to pixels = points * pixels_per_inch/72 * dpi/72 Parameters pointsfloat or arr...
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.RendererAgg.points_to_pixels
restore_region(region, bbox=None, xy=None)[source] Restore the saved region. If bbox (instance of BboxBase, or its extents) is given, only the region specified by the bbox will be restored. xy (a pair of floats) optionally specifies the new position (the LLC of the original region, not the LLC of the bbox) where the ...
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.RendererAgg.restore_region
start_filter()[source] Start filtering. It simply create a new canvas (the old one is saved).
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.RendererAgg.start_filter
stop_filter(post_processing)[source] Save the plot in the current canvas as a image and apply the post_processing function. def post_processing(image, dpi): # ny, nx, depth = image.shape # image (numpy array) has RGBA channels and has a depth of 4. ... # create a new_image (numpy array of 4 channels, size can be # ...
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.RendererAgg.stop_filter
tostring_argb()[source]
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.RendererAgg.tostring_argb
tostring_rgb()[source]
matplotlib.backend_agg_api#matplotlib.backends.backend_agg.RendererAgg.tostring_rgb