doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
get_familyname()[source] Return the font family name, e.g., 'Times'.
matplotlib.afm_api#matplotlib.afm.AFM.get_familyname
get_fontname()[source] Return the font name, e.g., 'Times-Roman'.
matplotlib.afm_api#matplotlib.afm.AFM.get_fontname
get_fullname()[source] Return the font full name, e.g., 'Times-Roman'.
matplotlib.afm_api#matplotlib.afm.AFM.get_fullname
get_height_char(c, isord=False)[source] Get the bounding box (ink) height of character c (space is 0).
matplotlib.afm_api#matplotlib.afm.AFM.get_height_char
get_horizontal_stem_width()[source] Return the standard horizontal stem width as float, or None if not specified in AFM file.
matplotlib.afm_api#matplotlib.afm.AFM.get_horizontal_stem_width
get_kern_dist(c1, c2)[source] Return the kerning pair distance (possibly 0) for chars c1 and c2.
matplotlib.afm_api#matplotlib.afm.AFM.get_kern_dist
get_kern_dist_from_name(name1, name2)[source] Return the kerning pair distance (possibly 0) for chars name1 and name2.
matplotlib.afm_api#matplotlib.afm.AFM.get_kern_dist_from_name
get_name_char(c, isord=False)[source] Get the name of the character, i.e., ';' is 'semicolon'.
matplotlib.afm_api#matplotlib.afm.AFM.get_name_char
get_str_bbox(s)[source] Return the string bounding box.
matplotlib.afm_api#matplotlib.afm.AFM.get_str_bbox
get_str_bbox_and_descent(s)[source] Return the string bounding box and the maximal descent.
matplotlib.afm_api#matplotlib.afm.AFM.get_str_bbox_and_descent
get_underline_thickness()[source] Return the underline thickness as float.
matplotlib.afm_api#matplotlib.afm.AFM.get_underline_thickness
get_vertical_stem_width()[source] Return the standard vertical stem width as float, or None if not specified in AFM file.
matplotlib.afm_api#matplotlib.afm.AFM.get_vertical_stem_width
get_weight()[source] Return the font weight, e.g., 'Bold' or 'Roman'.
matplotlib.afm_api#matplotlib.afm.AFM.get_weight
get_width_char(c, isord=False)[source] Get the width of the character from the character metric WX field.
matplotlib.afm_api#matplotlib.afm.AFM.get_width_char
get_width_from_char_name(name)[source] Get the width of the character from a type1 character name.
matplotlib.afm_api#matplotlib.afm.AFM.get_width_from_char_name
get_xheight()[source] Return the xheight as float.
matplotlib.afm_api#matplotlib.afm.AFM.get_xheight
string_width_height(s)[source] Return the string width (including kerning) and string height as a (w, h) tuple.
matplotlib.afm_api#matplotlib.afm.AFM.string_width_height
classmatplotlib.afm.CharMetrics(width, name, bbox)[source] Bases: tuple Represents the character metrics of a single character. Notes The fields do currently only describe a subset of character metrics information defined in the AFM standard. Create new instance of CharMetrics(width, name, bbox) bbox The bbox of ...
matplotlib.afm_api#matplotlib.afm.CharMetrics
bbox The bbox of the character (B) as a tuple (llx, lly, urx, ury).
matplotlib.afm_api#matplotlib.afm.CharMetrics.bbox
name The character name (N).
matplotlib.afm_api#matplotlib.afm.CharMetrics.name
width The character width (WX).
matplotlib.afm_api#matplotlib.afm.CharMetrics.width
classmatplotlib.afm.CompositePart(name, dx, dy)[source] Bases: tuple Represents the information on a composite element of a composite char. Create new instance of CompositePart(name, dx, dy) dx x-displacement of the part from the origin. dy y-displacement of the part from the origin. name Name of the ...
matplotlib.afm_api#matplotlib.afm.CompositePart
dx x-displacement of the part from the origin.
matplotlib.afm_api#matplotlib.afm.CompositePart.dx
dy y-displacement of the part from the origin.
matplotlib.afm_api#matplotlib.afm.CompositePart.dy
name Name of the part, e.g. 'acute'.
matplotlib.afm_api#matplotlib.afm.CompositePart.name
matplotlib.animation Table of Contents Inheritance Diagrams Animation Writer Classes Helper Classes Inheritance Diagrams Animation The easiest way to make a live animation in Matplotlib is to use one of the Animation classes. Animation A base class for Animations. FuncAnimation Makes an animat...
matplotlib.animation_api
matplotlib.animation.AbstractMovieWriter classmatplotlib.animation.AbstractMovieWriter(fps=5, metadata=None, codec=None, bitrate=None)[source] Abstract base class for writing movies. Fundamentally, what a MovieWriter does is provide is a way to grab frames by calling grab_frame(). setup() is called to start the pro...
matplotlib._as_gen.matplotlib.animation.abstractmoviewriter
__init__(fps=5, metadata=None, codec=None, bitrate=None)[source]
matplotlib._as_gen.matplotlib.animation.abstractmoviewriter#matplotlib.animation.AbstractMovieWriter.__init__
abstractfinish()[source] Finish any processing for writing the movie.
matplotlib._as_gen.matplotlib.animation.abstractmoviewriter#matplotlib.animation.AbstractMovieWriter.finish
abstractgrab_frame(**savefig_kwargs)[source] Grab the image information from the figure and save as a movie frame. All keyword arguments in savefig_kwargs are passed on to the savefig call that saves the figure.
matplotlib._as_gen.matplotlib.animation.abstractmoviewriter#matplotlib.animation.AbstractMovieWriter.grab_frame
saving(fig, outfile, dpi, *args, **kwargs) Context manager to facilitate writing the movie file. *args, **kw are any parameters that should be passed to setup.
matplotlib._as_gen.matplotlib.animation.abstractmoviewriter#matplotlib.animation.AbstractMovieWriter.saving
abstractsetup(fig, outfile, dpi=None)[source] Setup for writing the movie file. Parameters figFigure The figure object that contains the information for frames. outfilestr The filename of the resulting movie file. dpifloat, default: fig.dpi The DPI (or resolution) for the file. This controls the size in...
matplotlib._as_gen.matplotlib.animation.abstractmoviewriter#matplotlib.animation.AbstractMovieWriter.setup
matplotlib.animation.Animation classmatplotlib.animation.Animation(fig, event_source=None, blit=False)[source] A base class for Animations. This class is not usable as is, and should be subclassed to provide needed behavior. Note You must store the created Animation in a variable that lives as long as the animatio...
matplotlib._as_gen.matplotlib.animation.animation
__init__(fig, event_source=None, blit=False)[source]
matplotlib._as_gen.matplotlib.animation.animation#matplotlib.animation.Animation.__init__
new_frame_seq()[source] Return a new sequence of frame information.
matplotlib._as_gen.matplotlib.animation.animation#matplotlib.animation.Animation.new_frame_seq
new_saved_frame_seq()[source] Return a new sequence of saved/cached frame information.
matplotlib._as_gen.matplotlib.animation.animation#matplotlib.animation.Animation.new_saved_frame_seq
pause()[source] Pause the animation.
matplotlib._as_gen.matplotlib.animation.animation#matplotlib.animation.Animation.pause
resume()[source] Resume the animation.
matplotlib._as_gen.matplotlib.animation.animation#matplotlib.animation.Animation.resume
save(filename, writer=None, fps=None, dpi=None, codec=None, bitrate=None, extra_args=None, metadata=None, extra_anim=None, savefig_kwargs=None, *, progress_callback=None)[source] Save the animation as a movie file by drawing every frame. Parameters filenamestr The output filename, e.g., mymovie.mp4. writerMov...
matplotlib._as_gen.matplotlib.animation.animation#matplotlib.animation.Animation.save
to_html5_video(embed_limit=None)[source] Convert the animation to an HTML5 <video> tag. This saves the animation as an h264 video, encoded in base64 directly into the HTML5 video tag. This respects rcParams["animation.writer"] (default: 'ffmpeg') and rcParams["animation.bitrate"] (default: -1). This also makes use of...
matplotlib._as_gen.matplotlib.animation.animation#matplotlib.animation.Animation.to_html5_video
to_jshtml(fps=None, embed_frames=True, default_mode=None)[source] Generate HTML representation of the animation. Parameters fpsint, optional Movie frame rate (per second). If not set, the frame rate from the animation's frame interval. embed_framesbool, optional default_modestr, optional What to do when t...
matplotlib._as_gen.matplotlib.animation.animation#matplotlib.animation.Animation.to_jshtml
matplotlib.animation.ArtistAnimation classmatplotlib.animation.ArtistAnimation(fig, artists, *args, **kwargs)[source] Animation using a fixed set of Artist objects. Before creating an instance, all plotting should have taken place and the relevant artists saved. Note You must store the created Animation in a varia...
matplotlib._as_gen.matplotlib.animation.artistanimation
__init__(fig, artists, *args, **kwargs)[source]
matplotlib._as_gen.matplotlib.animation.artistanimation#matplotlib.animation.ArtistAnimation.__init__
matplotlib.animation.FFMpegBase classmatplotlib.animation.FFMpegBase[source] Mixin class for FFMpeg output. To be useful this must be multiply-inherited from with a MovieWriterBase sub-class. __init__(*args, **kwargs) Methods __init__(*args, **kwargs) Attributes output_args propertyoutput_args
matplotlib._as_gen.matplotlib.animation.ffmpegbase
__init__(*args, **kwargs)
matplotlib._as_gen.matplotlib.animation.ffmpegbase#matplotlib.animation.FFMpegBase.__init__
matplotlib.animation.FFMpegFileWriter classmatplotlib.animation.FFMpegFileWriter(*args, **kwargs)[source] File-based ffmpeg writer. Frames are written to temporary files on disk and then stitched together at the end. __init__(*args, **kwargs)[source] Methods __init__(*args, **kwargs) bin_path() Return the ...
matplotlib._as_gen.matplotlib.animation.ffmpegfilewriter
__init__(*args, **kwargs)[source]
matplotlib._as_gen.matplotlib.animation.ffmpegfilewriter#matplotlib.animation.FFMpegFileWriter.__init__
supported_formats=['png', 'jpeg', 'tiff', 'raw', 'rgba']
matplotlib._as_gen.matplotlib.animation.ffmpegfilewriter#matplotlib.animation.FFMpegFileWriter.supported_formats
matplotlib.animation.FFMpegWriter classmatplotlib.animation.FFMpegWriter(fps=5, codec=None, bitrate=None, extra_args=None, metadata=None)[source] Pipe-based ffmpeg writer. Frames are streamed directly to ffmpeg via a pipe and written in a single pass. Parameters fpsint, default: 5 Movie frame rate (per second...
matplotlib._as_gen.matplotlib.animation.ffmpegwriter
__init__(fps=5, codec=None, bitrate=None, extra_args=None, metadata=None)[source] Parameters fpsint, default: 5 Movie frame rate (per second). codecstr or None, default: rcParams["animation.codec"] (default: 'h264') The codec to use. bitrateint, default: rcParams["animation.bitrate"] (default: -1) The b...
matplotlib._as_gen.matplotlib.animation.ffmpegwriter#matplotlib.animation.FFMpegWriter.__init__
matplotlib.animation.FileMovieWriter classmatplotlib.animation.FileMovieWriter(*args, **kwargs)[source] MovieWriter for writing to individual files and stitching at the end. This must be sub-classed to be useful. Parameters fpsint, default: 5 Movie frame rate (per second). codecstr or None, default: rcParam...
matplotlib._as_gen.matplotlib.animation.filemoviewriter
__init__(*args, **kwargs)[source] Parameters fpsint, default: 5 Movie frame rate (per second). codecstr or None, default: rcParams["animation.codec"] (default: 'h264') The codec to use. bitrateint, default: rcParams["animation.bitrate"] (default: -1) The bitrate of the movie, in kilobits per second. Hig...
matplotlib._as_gen.matplotlib.animation.filemoviewriter#matplotlib.animation.FileMovieWriter.__init__
finish()[source] Finish any processing for writing the movie.
matplotlib._as_gen.matplotlib.animation.filemoviewriter#matplotlib.animation.FileMovieWriter.finish
grab_frame(**savefig_kwargs)[source] Grab the image information from the figure and save as a movie frame. All keyword arguments in savefig_kwargs are passed on to the savefig call that saves the figure.
matplotlib._as_gen.matplotlib.animation.filemoviewriter#matplotlib.animation.FileMovieWriter.grab_frame
setup(fig, outfile, dpi=None, frame_prefix=None)[source] Setup for writing the movie file. Parameters figFigure The figure to grab the rendered frames from. outfilestr The filename of the resulting movie file. dpifloat, default: fig.dpi The dpi of the output file. This, with the figure size, controls th...
matplotlib._as_gen.matplotlib.animation.filemoviewriter#matplotlib.animation.FileMovieWriter.setup
matplotlib.animation.FuncAnimation classmatplotlib.animation.FuncAnimation(fig, func, frames=None, init_func=None, fargs=None, save_count=None, *, cache_frame_data=True, **kwargs)[source] Makes an animation by repeatedly calling a function func. Note You must store the created Animation in a variable that lives as...
matplotlib._as_gen.matplotlib.animation.funcanimation
__init__(fig, func, frames=None, init_func=None, fargs=None, save_count=None, *, cache_frame_data=True, **kwargs)[source]
matplotlib._as_gen.matplotlib.animation.funcanimation#matplotlib.animation.FuncAnimation.__init__
new_frame_seq()[source] Return a new sequence of frame information.
matplotlib._as_gen.matplotlib.animation.funcanimation#matplotlib.animation.FuncAnimation.new_frame_seq
new_saved_frame_seq()[source] Return a new sequence of saved/cached frame information.
matplotlib._as_gen.matplotlib.animation.funcanimation#matplotlib.animation.FuncAnimation.new_saved_frame_seq
matplotlib.animation.HTMLWriter classmatplotlib.animation.HTMLWriter(fps=30, codec=None, bitrate=None, extra_args=None, metadata=None, embed_frames=False, default_mode='loop', embed_limit=None)[source] Writer for JavaScript-based HTML movies. Parameters fpsint, default: 5 Movie frame rate (per second). code...
matplotlib._as_gen.matplotlib.animation.htmlwriter
__init__(fps=30, codec=None, bitrate=None, extra_args=None, metadata=None, embed_frames=False, default_mode='loop', embed_limit=None)[source] Parameters fpsint, default: 5 Movie frame rate (per second). codecstr or None, default: rcParams["animation.codec"] (default: 'h264') The codec to use. bitrateint, ...
matplotlib._as_gen.matplotlib.animation.htmlwriter#matplotlib.animation.HTMLWriter.__init__
finish()[source] Finish any processing for writing the movie.
matplotlib._as_gen.matplotlib.animation.htmlwriter#matplotlib.animation.HTMLWriter.finish
grab_frame(**savefig_kwargs)[source] Grab the image information from the figure and save as a movie frame. All keyword arguments in savefig_kwargs are passed on to the savefig call that saves the figure.
matplotlib._as_gen.matplotlib.animation.htmlwriter#matplotlib.animation.HTMLWriter.grab_frame
classmethodisAvailable()[source] Return whether a MovieWriter subclass is actually available.
matplotlib._as_gen.matplotlib.animation.htmlwriter#matplotlib.animation.HTMLWriter.isAvailable
setup(fig, outfile, dpi, frame_dir=None)[source] Setup for writing the movie file. Parameters figFigure The figure to grab the rendered frames from. outfilestr The filename of the resulting movie file. dpifloat, default: fig.dpi The dpi of the output file. This, with the figure size, controls the size i...
matplotlib._as_gen.matplotlib.animation.htmlwriter#matplotlib.animation.HTMLWriter.setup
supported_formats=['png', 'jpeg', 'tiff', 'svg']
matplotlib._as_gen.matplotlib.animation.htmlwriter#matplotlib.animation.HTMLWriter.supported_formats
matplotlib.animation.ImageMagickBase classmatplotlib.animation.ImageMagickBase[source] Mixin class for ImageMagick output. To be useful this must be multiply-inherited from with a MovieWriterBase sub-class. __init__(*args, **kwargs) Methods __init__(*args, **kwargs) bin_path() isAvailable() Attribute...
matplotlib._as_gen.matplotlib.animation.imagemagickbase
__init__(*args, **kwargs)
matplotlib._as_gen.matplotlib.animation.imagemagickbase#matplotlib.animation.ImageMagickBase.__init__
classmethodbin_path()[source]
matplotlib._as_gen.matplotlib.animation.imagemagickbase#matplotlib.animation.ImageMagickBase.bin_path
classmethodisAvailable()[source]
matplotlib._as_gen.matplotlib.animation.imagemagickbase#matplotlib.animation.ImageMagickBase.isAvailable
matplotlib.animation.ImageMagickFileWriter classmatplotlib.animation.ImageMagickFileWriter(*args, **kwargs)[source] File-based animated gif writer. Frames are written to temporary files on disk and then stitched together at the end. __init__(*args, **kwargs)[source] Methods __init__(*args, **kwargs) bin_pa...
matplotlib._as_gen.matplotlib.animation.imagemagickfilewriter
__init__(*args, **kwargs)[source]
matplotlib._as_gen.matplotlib.animation.imagemagickfilewriter#matplotlib.animation.ImageMagickFileWriter.__init__
supported_formats=['png', 'jpeg', 'tiff', 'raw', 'rgba']
matplotlib._as_gen.matplotlib.animation.imagemagickfilewriter#matplotlib.animation.ImageMagickFileWriter.supported_formats
matplotlib.animation.ImageMagickWriter classmatplotlib.animation.ImageMagickWriter(fps=5, codec=None, bitrate=None, extra_args=None, metadata=None)[source] Pipe-based animated gif. Frames are streamed directly to ImageMagick via a pipe and written in a single pass. Parameters fpsint, default: 5 Movie frame ra...
matplotlib._as_gen.matplotlib.animation.imagemagickwriter
__init__(fps=5, codec=None, bitrate=None, extra_args=None, metadata=None)[source] Parameters fpsint, default: 5 Movie frame rate (per second). codecstr or None, default: rcParams["animation.codec"] (default: 'h264') The codec to use. bitrateint, default: rcParams["animation.bitrate"] (default: -1) The b...
matplotlib._as_gen.matplotlib.animation.imagemagickwriter#matplotlib.animation.ImageMagickWriter.__init__
matplotlib.animation.MovieWriter classmatplotlib.animation.MovieWriter(fps=5, codec=None, bitrate=None, extra_args=None, metadata=None)[source] Base class for writing movies. This is a base class for MovieWriter subclasses that write a movie frame data to a pipe. You cannot instantiate this class directly. See exam...
matplotlib._as_gen.matplotlib.animation.moviewriter
__init__(fps=5, codec=None, bitrate=None, extra_args=None, metadata=None)[source] Parameters fpsint, default: 5 Movie frame rate (per second). codecstr or None, default: rcParams["animation.codec"] (default: 'h264') The codec to use. bitrateint, default: rcParams["animation.bitrate"] (default: -1) The b...
matplotlib._as_gen.matplotlib.animation.moviewriter#matplotlib.animation.MovieWriter.__init__
classmethodbin_path()[source] Return the binary path to the commandline tool used by a specific subclass. This is a class method so that the tool can be looked for before making a particular MovieWriter subclass available.
matplotlib._as_gen.matplotlib.animation.moviewriter#matplotlib.animation.MovieWriter.bin_path
cleanup()[source] [Deprecated] Notes Deprecated since version 3.4:
matplotlib._as_gen.matplotlib.animation.moviewriter#matplotlib.animation.MovieWriter.cleanup
finish()[source] Finish any processing for writing the movie.
matplotlib._as_gen.matplotlib.animation.moviewriter#matplotlib.animation.MovieWriter.finish
grab_frame(**savefig_kwargs)[source] Grab the image information from the figure and save as a movie frame. All keyword arguments in savefig_kwargs are passed on to the savefig call that saves the figure.
matplotlib._as_gen.matplotlib.animation.moviewriter#matplotlib.animation.MovieWriter.grab_frame
classmethodisAvailable()[source] Return whether a MovieWriter subclass is actually available.
matplotlib._as_gen.matplotlib.animation.moviewriter#matplotlib.animation.MovieWriter.isAvailable
setup(fig, outfile, dpi=None)[source] Setup for writing the movie file. Parameters figFigure The figure object that contains the information for frames. outfilestr The filename of the resulting movie file. dpifloat, default: fig.dpi The DPI (or resolution) for the file. This controls the size in pixels ...
matplotlib._as_gen.matplotlib.animation.moviewriter#matplotlib.animation.MovieWriter.setup
supported_formats=['rgba']
matplotlib._as_gen.matplotlib.animation.moviewriter#matplotlib.animation.MovieWriter.supported_formats
matplotlib.animation.MovieWriterRegistry classmatplotlib.animation.MovieWriterRegistry[source] Registry of available writer classes by human readable name. __init__()[source] Methods __init__() is_available(name) Check if given writer is available by name. list() Get a list of available MovieWriters. r...
matplotlib._as_gen.matplotlib.animation.moviewriterregistry
__init__()[source]
matplotlib._as_gen.matplotlib.animation.moviewriterregistry#matplotlib.animation.MovieWriterRegistry.__init__
is_available(name)[source] Check if given writer is available by name. Parameters namestr Returns bool
matplotlib._as_gen.matplotlib.animation.moviewriterregistry#matplotlib.animation.MovieWriterRegistry.is_available
list()[source] Get a list of available MovieWriters.
matplotlib._as_gen.matplotlib.animation.moviewriterregistry#matplotlib.animation.MovieWriterRegistry.list
register(name)[source] Decorator for registering a class under a name. Example use: @registry.register(name) class Foo: pass
matplotlib._as_gen.matplotlib.animation.moviewriterregistry#matplotlib.animation.MovieWriterRegistry.register
matplotlib.animation.PillowWriter classmatplotlib.animation.PillowWriter(fps=5, metadata=None, codec=None, bitrate=None)[source] __init__(fps=5, metadata=None, codec=None, bitrate=None)[source] Methods __init__([fps, metadata, codec, bitrate]) finish() Finish any processing for writing the movie. grab_fr...
matplotlib._as_gen.matplotlib.animation.pillowwriter
__init__(fps=5, metadata=None, codec=None, bitrate=None)[source]
matplotlib._as_gen.matplotlib.animation.pillowwriter#matplotlib.animation.PillowWriter.__init__
finish()[source] Finish any processing for writing the movie.
matplotlib._as_gen.matplotlib.animation.pillowwriter#matplotlib.animation.PillowWriter.finish
grab_frame(**savefig_kwargs)[source] Grab the image information from the figure and save as a movie frame. All keyword arguments in savefig_kwargs are passed on to the savefig call that saves the figure.
matplotlib._as_gen.matplotlib.animation.pillowwriter#matplotlib.animation.PillowWriter.grab_frame
classmethodisAvailable()[source]
matplotlib._as_gen.matplotlib.animation.pillowwriter#matplotlib.animation.PillowWriter.isAvailable
setup(fig, outfile, dpi=None)[source] Setup for writing the movie file. Parameters figFigure The figure object that contains the information for frames. outfilestr The filename of the resulting movie file. dpifloat, default: fig.dpi The DPI (or resolution) for the file. This controls the size in pixels ...
matplotlib._as_gen.matplotlib.animation.pillowwriter#matplotlib.animation.PillowWriter.setup
matplotlib.animation.TimedAnimation classmatplotlib.animation.TimedAnimation(fig, interval=200, repeat_delay=0, repeat=True, event_source=None, *args, **kwargs)[source] Animation subclass for time-based animation. A new frame is drawn every interval milliseconds. Note You must store the created Animation in a vari...
matplotlib._as_gen.matplotlib.animation.timedanimation
__init__(fig, interval=200, repeat_delay=0, repeat=True, event_source=None, *args, **kwargs)[source]
matplotlib._as_gen.matplotlib.animation.timedanimation#matplotlib.animation.TimedAnimation.__init__
matplotlib.artist Inheritance Diagrams Artist class classmatplotlib.artist.Artist[source] Abstract base class for objects that render into a FigureCanvas. Typically, all visible elements in a figure are subclasses of Artist. Intera...
matplotlib.artist_api
matplotlib.artist.allow_rasterization matplotlib.artist.allow_rasterization(draw)[source] Decorator for Artist.draw method. Provides routines that run before and after the draw call. The before and after functions are useful for changing artist-dependent renderer attributes or making other setup function calls, suc...
matplotlib._as_gen.matplotlib.artist.allow_rasterization
classmatplotlib.artist.Artist[source] Abstract base class for objects that render into a FigureCanvas. Typically, all visible elements in a figure are subclasses of Artist.
matplotlib.artist_api#matplotlib.artist.Artist