doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
matplotlib.fontconfig_pattern.generate_fontconfig_pattern(d)[source] Given a dictionary of key/value pairs, generates a fontconfig pattern string.
matplotlib.fontconfig_pattern_api#matplotlib.fontconfig_pattern.generate_fontconfig_pattern
matplotlib.fontconfig_pattern.parse_fontconfig_pattern(pattern)[source] Parse the given fontconfig pattern and return a dictionary of key/value pairs useful for initializing a font_manager.FontProperties object.
matplotlib.fontconfig_pattern_api#matplotlib.fontconfig_pattern.parse_fontconfig_pattern
matplotlib.fontconfig_pattern.value_escape(/, repl, string, count=0) Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.
matplotlib.fontconfig_pattern_api#matplotlib.fontconfig_pattern.value_escape
matplotlib.fontconfig_pattern.value_unescape(/, repl, string, count=0) Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.
matplotlib.fontconfig_pattern_api#matplotlib.fontconfig_pattern.value_unescape
matplotlib.get_backend()[source] Return the name of the current backend. See also matplotlib.use
matplotlib_configuration_api#matplotlib.get_backend
matplotlib.get_cachedir()[source] Return the string path of the cache directory. The procedure used to find the directory is the same as for _get_config_dir, except using $XDG_CACHE_HOME/$HOME/.cache instead.
matplotlib_configuration_api#matplotlib.get_cachedir
matplotlib.get_configdir()[source] Return the string path of the configuration directory. The directory is chosen as follows: If the MPLCONFIGDIR environment variable is supplied, choose that. On Linux, follow the XDG specification and look first in $XDG_CONFIG_HOME, if defined, or $HOME/.config. On other platforms,...
matplotlib_configuration_api#matplotlib.get_configdir
matplotlib.get_data_path()[source] Return the path to Matplotlib data.
matplotlib_configuration_api#matplotlib.get_data_path
matplotlib.gridspec gridspec contains classes that help to layout multiple Axes in a grid-like pattern within a figure. The GridSpec specifies the overall grid structure. Individual cells within the grid are referenced by SubplotSpecs. Often, users need not access this module directly, and can use higher-level methods ...
matplotlib.gridspec_api
matplotlib.gridspec.GridSpec classmatplotlib.gridspec.GridSpec(nrows, ncols, figure=None, left=None, bottom=None, right=None, top=None, wspace=None, hspace=None, width_ratios=None, height_ratios=None)[source] Bases: matplotlib.gridspec.GridSpecBase A grid layout to place subplots within a figure. The location of th...
matplotlib._as_gen.matplotlib.gridspec.gridspec
get_subplot_params(figure=None)[source] Return the SubplotParams for the GridSpec. In order of precedence the values are taken from non-None attributes of the GridSpec the provided figure rcParams["figure.subplot.*"]
matplotlib._as_gen.matplotlib.gridspec.gridspec#matplotlib.gridspec.GridSpec.get_subplot_params
locally_modified_subplot_params()[source] Return a list of the names of the subplot parameters explicitly set in the GridSpec. This is a subset of the attributes of SubplotParams.
matplotlib._as_gen.matplotlib.gridspec.gridspec#matplotlib.gridspec.GridSpec.locally_modified_subplot_params
tight_layout(figure, renderer=None, pad=1.08, h_pad=None, w_pad=None, rect=None)[source] Adjust subplot parameters to give specified padding. Parameters padfloat Padding between the figure edge and the edges of subplots, as a fraction of the font-size. h_pad, w_padfloat, optional Padding (height/width) betw...
matplotlib._as_gen.matplotlib.gridspec.gridspec#matplotlib.gridspec.GridSpec.tight_layout
update(**kwargs)[source] Update the subplot parameters of the grid. Parameters that are not explicitly given are not changed. Setting a parameter to None resets it to rcParams["figure.subplot.*"]. Parameters left, right, top, bottomfloat or None, optional Extent of the subplots as a fraction of figure width or ...
matplotlib._as_gen.matplotlib.gridspec.gridspec#matplotlib.gridspec.GridSpec.update
matplotlib.gridspec.GridSpecBase classmatplotlib.gridspec.GridSpecBase(nrows, ncols, height_ratios=None, width_ratios=None)[source] Bases: object A base class of GridSpec that specifies the geometry of the grid that a subplot will be placed. Parameters nrows, ncolsint The number of rows and columns of the gri...
matplotlib._as_gen.matplotlib.gridspec.gridspecbase
get_geometry()[source] Return a tuple containing the number of rows and columns in the grid.
matplotlib._as_gen.matplotlib.gridspec.gridspecbase#matplotlib.gridspec.GridSpecBase.get_geometry
get_grid_positions(fig, raw=False)[source] Return the positions of the grid cells in figure coordinates. Parameters figFigure The figure the grid should be applied to. The subplot parameters (margins and spacing between subplots) are taken from fig. rawbool, default: False If True, the subplot parameters of...
matplotlib._as_gen.matplotlib.gridspec.gridspecbase#matplotlib.gridspec.GridSpecBase.get_grid_positions
get_height_ratios()[source] Return the height ratios. This is None if no height ratios have been set explicitly.
matplotlib._as_gen.matplotlib.gridspec.gridspecbase#matplotlib.gridspec.GridSpecBase.get_height_ratios
get_subplot_params(figure=None)[source]
matplotlib._as_gen.matplotlib.gridspec.gridspecbase#matplotlib.gridspec.GridSpecBase.get_subplot_params
get_width_ratios()[source] Return the width ratios. This is None if no width ratios have been set explicitly.
matplotlib._as_gen.matplotlib.gridspec.gridspecbase#matplotlib.gridspec.GridSpecBase.get_width_ratios
new_subplotspec(loc, rowspan=1, colspan=1)[source] Create and return a SubplotSpec instance. Parameters loc(int, int) The position of the subplot in the grid as (row_index, column_index). rowspan, colspanint, default: 1 The number of rows and columns the subplot should span in the grid.
matplotlib._as_gen.matplotlib.gridspec.gridspecbase#matplotlib.gridspec.GridSpecBase.new_subplotspec
set_height_ratios(height_ratios)[source] Set the relative heights of the rows. height_ratios must be of length nrows. Each row gets a relative height of height_ratios[i] / sum(height_ratios).
matplotlib._as_gen.matplotlib.gridspec.gridspecbase#matplotlib.gridspec.GridSpecBase.set_height_ratios
set_width_ratios(width_ratios)[source] Set the relative widths of the columns. width_ratios must be of length ncols. Each column gets a relative width of width_ratios[i] / sum(width_ratios).
matplotlib._as_gen.matplotlib.gridspec.gridspecbase#matplotlib.gridspec.GridSpecBase.set_width_ratios
subplots(*, sharex=False, sharey=False, squeeze=True, subplot_kw=None)[source] Add all subplots specified by this GridSpec to its parent figure. See Figure.subplots for detailed documentation.
matplotlib._as_gen.matplotlib.gridspec.gridspecbase#matplotlib.gridspec.GridSpecBase.subplots
matplotlib.gridspec.GridSpecFromSubplotSpec classmatplotlib.gridspec.GridSpecFromSubplotSpec(nrows, ncols, subplot_spec, wspace=None, hspace=None, height_ratios=None, width_ratios=None)[source] Bases: matplotlib.gridspec.GridSpecBase GridSpec whose subplot layout parameters are inherited from the location specified...
matplotlib._as_gen.matplotlib.gridspec.gridspecfromsubplotspec
get_subplot_params(figure=None)[source] Return a dictionary of subplot layout parameters.
matplotlib._as_gen.matplotlib.gridspec.gridspecfromsubplotspec#matplotlib.gridspec.GridSpecFromSubplotSpec.get_subplot_params
get_topmost_subplotspec()[source] Return the topmost SubplotSpec instance associated with the subplot.
matplotlib._as_gen.matplotlib.gridspec.gridspecfromsubplotspec#matplotlib.gridspec.GridSpecFromSubplotSpec.get_topmost_subplotspec
matplotlib.gridspec.SubplotSpec classmatplotlib.gridspec.SubplotSpec(gridspec, num1, num2=None)[source] Bases: object The location of a subplot in a GridSpec. Note Likely, you'll never instantiate a SubplotSpec yourself. Instead you will typically obtain one from a GridSpec using item-access. Parameters grids...
matplotlib._as_gen.matplotlib.gridspec.subplotspec
get_geometry()[source] Return the subplot geometry as tuple (n_rows, n_cols, start, stop). The indices start and stop define the range of the subplot within the GridSpec. stop is inclusive (i.e. for a single cell start == stop).
matplotlib._as_gen.matplotlib.gridspec.subplotspec#matplotlib.gridspec.SubplotSpec.get_geometry
get_gridspec()[source]
matplotlib._as_gen.matplotlib.gridspec.subplotspec#matplotlib.gridspec.SubplotSpec.get_gridspec
get_position(figure, return_all=<deprecated parameter>)[source] Update the subplot position from figure.subplotpars.
matplotlib._as_gen.matplotlib.gridspec.subplotspec#matplotlib.gridspec.SubplotSpec.get_position
get_topmost_subplotspec()[source] Return the topmost SubplotSpec instance associated with the subplot.
matplotlib._as_gen.matplotlib.gridspec.subplotspec#matplotlib.gridspec.SubplotSpec.get_topmost_subplotspec
is_first_col()[source]
matplotlib._as_gen.matplotlib.gridspec.subplotspec#matplotlib.gridspec.SubplotSpec.is_first_col
is_first_row()[source]
matplotlib._as_gen.matplotlib.gridspec.subplotspec#matplotlib.gridspec.SubplotSpec.is_first_row
is_last_col()[source]
matplotlib._as_gen.matplotlib.gridspec.subplotspec#matplotlib.gridspec.SubplotSpec.is_last_col
is_last_row()[source]
matplotlib._as_gen.matplotlib.gridspec.subplotspec#matplotlib.gridspec.SubplotSpec.is_last_row
subgridspec(nrows, ncols, **kwargs)[source] Create a GridSpec within this subplot. The created GridSpecFromSubplotSpec will have this SubplotSpec as a parent. Parameters nrowsint Number of rows in grid. ncolsint Number or columns in grid. Returns GridSpecFromSubplotSpec Other Parameters **kwargs A...
matplotlib._as_gen.matplotlib.gridspec.subplotspec#matplotlib.gridspec.SubplotSpec.subgridspec
matplotlib.image The image module supports basic image loading, rescaling and display operations. classmatplotlib.image.AxesImage(ax, cmap=None, norm=None, interpolation=None, origin=None, extent=None, filternorm=True, filterrad=4.0, resample=False, *, interpolation_stage=None, **kwargs)[source] Bases: matplotlib.i...
matplotlib.image_api
classmatplotlib.image.AxesImage(ax, cmap=None, norm=None, interpolation=None, origin=None, extent=None, filternorm=True, filterrad=4.0, resample=False, *, interpolation_stage=None, **kwargs)[source] Bases: matplotlib.image._ImageBase An image attached to an Axes. Parameters axAxes The axes the image will belong...
matplotlib.image_api#matplotlib.image.AxesImage
get_cursor_data(event)[source] Return the image value at the event position or None if the event is outside the image. See also matplotlib.artist.Artist.get_cursor_data
matplotlib.image_api#matplotlib.image.AxesImage.get_cursor_data
get_extent()[source] Return the image extent as tuple (left, right, bottom, top).
matplotlib.image_api#matplotlib.image.AxesImage.get_extent
get_window_extent(renderer=None)[source] Get the artist's bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the re...
matplotlib.image_api#matplotlib.image.AxesImage.get_window_extent
make_image(renderer, magnification=1.0, unsampled=False)[source] Normalize, rescale, and colormap this image's data for rendering using renderer, with the given magnification. If unsampled is True, the image will not be scaled, but an appropriate affine transformation will be returned instead. Returns image(M, N,...
matplotlib.image_api#matplotlib.image.AxesImage.make_image
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, array=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, data=<UNSET>, extent=<UNSET>, filternorm=<UNSET>, filterrad=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, interpolation=<UNSET>, interpolation_stage=<UNSET>, label=<UNS...
matplotlib.image_api#matplotlib.image.AxesImage.set
set_extent(extent)[source] Set the image extent. Parameters extent4-tuple of float The position and size of the image as tuple (left, right, bottom, top) in data coordinates. Notes This updates ax.dataLim, and, if autoscaling, sets ax.viewLim to tightly fit the image, regardless of dataLim. Autoscaling stat...
matplotlib.image_api#matplotlib.image.AxesImage.set_extent
classmatplotlib.image.BboxImage(bbox, cmap=None, norm=None, interpolation=None, origin=None, filternorm=True, filterrad=4.0, resample=False, **kwargs)[source] Bases: matplotlib.image._ImageBase The Image class whose size is determined by the given bbox. cmap is a colors.Colormap instance norm is a colors.Normalize in...
matplotlib.image_api#matplotlib.image.BboxImage
contains(mouseevent)[source] Test whether the mouse event occurred within the image.
matplotlib.image_api#matplotlib.image.BboxImage.contains
get_window_extent(renderer=None)[source] Get the artist's bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the re...
matplotlib.image_api#matplotlib.image.BboxImage.get_window_extent
make_image(renderer, magnification=1.0, unsampled=False)[source] Normalize, rescale, and colormap this image's data for rendering using renderer, with the given magnification. If unsampled is True, the image will not be scaled, but an appropriate affine transformation will be returned instead. Returns image(M, N,...
matplotlib.image_api#matplotlib.image.BboxImage.make_image
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, array=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, data=<UNSET>, filternorm=<UNSET>, filterrad=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, interpolation=<UNSET>, interpolation_stage=<UNSET>, label=<UNSET>, norm=<UNSET...
matplotlib.image_api#matplotlib.image.BboxImage.set
matplotlib.image.composite_images(images, renderer, magnification=1.0)[source] Composite a number of RGBA images into one. The images are composited in the order in which they appear in the images list. Parameters imageslist of Images Each must have a make_image method. For each image, can_composite should retu...
matplotlib.image_api#matplotlib.image.composite_images
classmatplotlib.image.FigureImage(fig, cmap=None, norm=None, offsetx=0, offsety=0, origin=None, **kwargs)[source] Bases: matplotlib.image._ImageBase An image attached to a figure. cmap is a colors.Colormap instance norm is a colors.Normalize instance to map luminance to 0-1 kwargs are an optional list of Artist keywo...
matplotlib.image_api#matplotlib.image.FigureImage
get_extent()[source] Return the image extent as tuple (left, right, bottom, top).
matplotlib.image_api#matplotlib.image.FigureImage.get_extent
make_image(renderer, magnification=1.0, unsampled=False)[source] Normalize, rescale, and colormap this image's data for rendering using renderer, with the given magnification. If unsampled is True, the image will not be scaled, but an appropriate affine transformation will be returned instead. Returns image(M, N,...
matplotlib.image_api#matplotlib.image.FigureImage.make_image
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, array=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, data=<UNSET>, filternorm=<UNSET>, filterrad=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, interpolation=<UNSET>, interpolation_stage=<UNSET>, label=<UNSET>, norm=<UNSET...
matplotlib.image_api#matplotlib.image.FigureImage.set
set_data(A)[source] Set the image array.
matplotlib.image_api#matplotlib.image.FigureImage.set_data
zorder=0
matplotlib.image_api#matplotlib.image.FigureImage.zorder
matplotlib.image.imread(fname, format=None)[source] Read an image from a file into an array. Note This function exists for historical reasons. It is recommended to use PIL.Image.open instead for loading images. Parameters fnamestr or file-like The image file to read: a filename, a URL or a file-like object op...
matplotlib.image_api#matplotlib.image.imread
matplotlib.image.imsave(fname, arr, vmin=None, vmax=None, cmap=None, format=None, origin=None, dpi=100, *, metadata=None, pil_kwargs=None)[source] Save an array as an image file. Parameters fnamestr or path-like or file-like A path or a file-like object to store the image in. If format is not set, then the outp...
matplotlib.image_api#matplotlib.image.imsave
classmatplotlib.image.NonUniformImage(ax, *, interpolation='nearest', **kwargs)[source] Bases: matplotlib.image.AxesImage Parameters interpolation{'nearest', 'bilinear'}, default: 'nearest' **kwargs All other keyword arguments are identical to those of AxesImage. get_extent()[source] Return the image ex...
matplotlib.image_api#matplotlib.image.NonUniformImage
get_extent()[source] Return the image extent as tuple (left, right, bottom, top).
matplotlib.image_api#matplotlib.image.NonUniformImage.get_extent
make_image(renderer, magnification=1.0, unsampled=False)[source] Normalize, rescale, and colormap this image's data for rendering using renderer, with the given magnification. If unsampled is True, the image will not be scaled, but an appropriate affine transformation will be returned instead. Returns image(M, N,...
matplotlib.image_api#matplotlib.image.NonUniformImage.make_image
mouseover=False
matplotlib.image_api#matplotlib.image.NonUniformImage.mouseover
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, array=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, data=<UNSET>, extent=<UNSET>, filternorm=<UNSET>, filterrad=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, interpolation=<UNSET>, interpolation_stage=<UNSET>, label=<UNS...
matplotlib.image_api#matplotlib.image.NonUniformImage.set
set_array(*args)[source] Retained for backwards compatibility - use set_data instead. Parameters Aarray-like
matplotlib.image_api#matplotlib.image.NonUniformImage.set_array
set_cmap(cmap)[source] Set the colormap for luminance data. Parameters cmapColormap or str or None
matplotlib.image_api#matplotlib.image.NonUniformImage.set_cmap
set_data(x, y, A)[source] Set the grid for the pixel centers, and the pixel values. Parameters x, y1D array-like Monotonic arrays of shapes (N,) and (M,), respectively, specifying pixel centers. Aarray-like (M, N) ndarray or masked array of values to be colormapped, or (M, N, 3) RGB array, or (M, N, 4) RGBA...
matplotlib.image_api#matplotlib.image.NonUniformImage.set_data
set_filternorm(s)[source] Set whether the resize filter normalizes the weights. See help for imshow. Parameters filternormbool
matplotlib.image_api#matplotlib.image.NonUniformImage.set_filternorm
set_filterrad(s)[source] Set the resize filter radius only applicable to some interpolation schemes -- see help for imshow Parameters filterradpositive float
matplotlib.image_api#matplotlib.image.NonUniformImage.set_filterrad
set_interpolation(s)[source] Parameters s{'nearest', 'bilinear'} or None If None, use rcParams["image.interpolation"] (default: 'antialiased').
matplotlib.image_api#matplotlib.image.NonUniformImage.set_interpolation
set_norm(norm)[source] Set the normalization instance. Parameters normNormalize or None Notes If there are any colorbars using the mappable for this norm, setting the norm of the mappable will reset the norm, locator, and formatters on the colorbar to default.
matplotlib.image_api#matplotlib.image.NonUniformImage.set_norm
classmatplotlib.image.PcolorImage(ax, x=None, y=None, A=None, cmap=None, norm=None, **kwargs)[source] Bases: matplotlib.image.AxesImage Make a pcolor-style plot with an irregular rectangular grid. This uses a variation of the original irregular image code, and it is used by pcolorfast for the corresponding grid type....
matplotlib.image_api#matplotlib.image.PcolorImage
get_cursor_data(event)[source] Return the image value at the event position or None if the event is outside the image. See also matplotlib.artist.Artist.get_cursor_data
matplotlib.image_api#matplotlib.image.PcolorImage.get_cursor_data
make_image(renderer, magnification=1.0, unsampled=False)[source] Normalize, rescale, and colormap this image's data for rendering using renderer, with the given magnification. If unsampled is True, the image will not be scaled, but an appropriate affine transformation will be returned instead. Returns image(M, N,...
matplotlib.image_api#matplotlib.image.PcolorImage.make_image
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, array=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, data=<UNSET>, extent=<UNSET>, filternorm=<UNSET>, filterrad=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, interpolation=<UNSET>, interpolation_stage=<UNSET>, label=<UNS...
matplotlib.image_api#matplotlib.image.PcolorImage.set
set_array(*args)[source] Retained for backwards compatibility - use set_data instead. Parameters Aarray-like
matplotlib.image_api#matplotlib.image.PcolorImage.set_array
set_data(x, y, A)[source] Set the grid for the rectangle boundaries, and the data values. Parameters x, y1D array-like, optional Monotonic arrays of length N+1 and M+1, respectively, specifying rectangle boundaries. If not given, will default to range(N + 1) and range(M + 1), respectively. Aarray-like The d...
matplotlib.image_api#matplotlib.image.PcolorImage.set_data
matplotlib.image.pil_to_array(pilImage)[source] Load a PIL image and return it as a numpy int array. Returns numpy.array The array shape depends on the image type: (M, N) for grayscale images. (M, N, 3) for RGB images. (M, N, 4) for RGBA images.
matplotlib.image_api#matplotlib.image.pil_to_array
matplotlib.image.thumbnail(infile, thumbfile, scale=0.1, interpolation='bilinear', preview=False)[source] Make a thumbnail of image in infile with output filename thumbfile. See Image Thumbnail. Parameters infilestr or file-like The image file. Matplotlib relies on Pillow for image reading, and thus supports a ...
matplotlib.image_api#matplotlib.image.thumbnail
matplotlib.interactive(b)[source] Set whether to redraw after every plotting command (e.g. pyplot.xlabel).
matplotlib_configuration_api#matplotlib.interactive
matplotlib.is_interactive()[source] Return whether to redraw after every plotting command. Note This function is only intended for use in backends. End users should use pyplot.isinteractive instead.
matplotlib_configuration_api#matplotlib.is_interactive
matplotlib.legend The legend module defines the Legend class, which is responsible for drawing legends associated with axes and/or figures. Important It is unlikely that you would ever create a Legend instance manually. Most users would normally create a legend via the legend function. For more details on legends ther...
matplotlib.legend_api
classmatplotlib.legend.DraggableLegend(legend, use_blit=False, update='loc')[source] Bases: matplotlib.offsetbox.DraggableOffsetBox Wrapper around a Legend to support mouse dragging. Parameters legendLegend The Legend instance to wrap. use_blitbool, optional Use blitting for faster image composition. For de...
matplotlib.legend_api#matplotlib.legend.DraggableLegend
finalize_offset()[source]
matplotlib.legend_api#matplotlib.legend.DraggableLegend.finalize_offset
classmatplotlib.legend.Legend(parent, handles, labels, loc=None, numpoints=None, markerscale=None, markerfirst=True, scatterpoints=None, scatteryoffsets=None, prop=None, fontsize=None, labelcolor=None, borderpad=None, labelspacing=None, handlelength=None, handleheight=None, handletextpad=None, borderaxespad=None, colum...
matplotlib.legend_api#matplotlib.legend.Legend
codes={'best': 0, 'center': 10, 'center left': 6, 'center right': 7, 'lower center': 8, 'lower left': 3, 'lower right': 4, 'right': 5, 'upper center': 9, 'upper left': 2, 'upper right': 1}
matplotlib.legend_api#matplotlib.legend.Legend.codes
contains(event)[source] Test whether the artist contains the mouse event. Parameters mouseeventmatplotlib.backend_bases.MouseEvent Returns containsbool Whether any values are within the radius. detailsdict An artist-specific dictionary of details of the event context, such as which points are containe...
matplotlib.legend_api#matplotlib.legend.Legend.contains
draw(renderer)[source] Draw the Artist (and its children) using the given renderer. This has no effect if the artist is not visible (Artist.get_visible returns False). Parameters rendererRendererBase subclass. Notes This method is overridden in the Artist subclasses.
matplotlib.legend_api#matplotlib.legend.Legend.draw
draw_frame(b)[source] Set whether the legend box patch is drawn. Parameters bbool
matplotlib.legend_api#matplotlib.legend.Legend.draw_frame
get_bbox_to_anchor()[source] Return the bbox that the legend will be anchored to.
matplotlib.legend_api#matplotlib.legend.Legend.get_bbox_to_anchor
get_children()[source] Return a list of the child Artists of this Artist.
matplotlib.legend_api#matplotlib.legend.Legend.get_children
classmethodget_default_handler_map()[source] A class method that returns the default handler map.
matplotlib.legend_api#matplotlib.legend.Legend.get_default_handler_map
get_draggable()[source] Return True if the legend is draggable, False otherwise.
matplotlib.legend_api#matplotlib.legend.Legend.get_draggable
get_frame()[source] Return the Rectangle used to frame the legend.
matplotlib.legend_api#matplotlib.legend.Legend.get_frame
get_frame_on()[source] Get whether the legend box patch is drawn.
matplotlib.legend_api#matplotlib.legend.Legend.get_frame_on
staticget_legend_handler(legend_handler_map, orig_handle)[source] Return a legend handler from legend_handler_map that corresponds to orig_handler. legend_handler_map should be a dictionary object (that is returned by the get_legend_handler_map method). It first checks if the orig_handle itself is a key in the legend...
matplotlib.legend_api#matplotlib.legend.Legend.get_legend_handler
get_legend_handler_map()[source] Return the handler map.
matplotlib.legend_api#matplotlib.legend.Legend.get_legend_handler_map
get_lines()[source] Return the list of Line2Ds in the legend.
matplotlib.legend_api#matplotlib.legend.Legend.get_lines
get_patches()[source] Return the list of Patchs in the legend.
matplotlib.legend_api#matplotlib.legend.Legend.get_patches
get_texts()[source] Return the list of Texts in the legend.
matplotlib.legend_api#matplotlib.legend.Legend.get_texts