neulab/docprompting-conala huggingface dataset:
classmatplotlib._enums.CapStyle(value)[source]
 
Define how the two endpoints (caps) of an unclosed line are drawn. How to draw the start and end points of lines that represent a closed curve (i.e. that end in a CLOSEPOLY) is controlled by the line's JoinStyle. For all other lines, how the start and end points are drawn is controlled by the CapStyle. For a visual impression of each CapStyle, view these docs online or run CapStyle.demo. Supported values:  'butt'

the line is squared off at its endpoint.  'projecting'

the line is squared off as in butt, but the filled in area extends beyond the endpoint a distance of linewidth/2.  'round'

like butt, but a semicircular cap is added to the end of the line, of radius linewidth/2.   (Source code, png, pdf)      staticdemo()[source]
 
Demonstrate how each CapStyle looks for a thick line segment.
staticdemo()[source]
 
Demonstrate how each CapStyle looks for a thick line segment.
classmatplotlib._enums.JoinStyle(value)[source]
 
Define how the connection between two line segments is drawn. For a visual impression of each JoinStyle, view these docs online, or run JoinStyle.demo. Lines in Matplotlib are typically defined by a 1D Path and a finite linewidth, where the underlying 1D Path represents the center of the stroked line. By default, GraphicsContextBase defines the boundaries of a stroked line to simply be every point within some radius, linewidth/2, away from any point of the center line. However, this results in corners appearing "rounded", which may not be the desired behavior if you are drawing, for example, a polygon or pointed star. Supported values:  'miter'

the "arrow-tip" style. Each boundary of the filled-in area will extend in a straight line parallel to the tangent vector of the centerline at the point it meets the corner, until they meet in a sharp point.  'round'

stokes every point within a radius of linewidth/2 of the center lines.  'bevel'

the "squared-off" style. It can be thought of as a rounded corner where the "circular" part of the corner has been cut off.    Note Very long miter tips are cut off (to form a bevel) after a backend-dependent limit called the "miter limit", which specifies the maximum allowed ratio of miter length to line width. For example, the PDF backend uses the default value of 10 specified by the PDF standard, while the SVG backend does not even specify the miter limit, resulting in a default value of 4 per the SVG specification. Matplotlib does not currently allow the user to adjust this parameter. A more detailed description of the effect of a miter limit can be found in the Mozilla Developer Docs  (Source code, png, pdf)      staticdemo()[source]
 
Demonstrate how each JoinStyle looks for various join angles.
staticdemo()[source]
 
Demonstrate how each JoinStyle looks for various join angles.
classmatplotlib.afm.AFM(fh)[source]
 
Bases: object Parse the AFM file in file object fh.   propertyfamily_name
 
The font family name, e.g., 'Times'. 
   get_angle()[source]
 
Return the fontangle as float. 
   get_bbox_char(c, isord=False)[source]

   get_capheight()[source]
 
Return the cap height as float. 
   get_familyname()[source]
 
Return the font family name, e.g., 'Times'. 
   get_fontname()[source]
 
Return the font name, e.g., 'Times-Roman'. 
   get_fullname()[source]
 
Return the font full name, e.g., 'Times-Roman'. 
   get_height_char(c, isord=False)[source]
 
Get the bounding box (ink) height of character c (space is 0). 
   get_horizontal_stem_width()[source]
 
Return the standard horizontal stem width as float, or None if not specified in AFM file. 
   get_kern_dist(c1, c2)[source]
 
Return the kerning pair distance (possibly 0) for chars c1 and c2. 
   get_kern_dist_from_name(name1, name2)[source]
 
Return the kerning pair distance (possibly 0) for chars name1 and name2. 
   get_name_char(c, isord=False)[source]
 
Get the name of the character, i.e., ';' is 'semicolon'. 
   get_str_bbox(s)[source]
 
Return the string bounding box. 
   get_str_bbox_and_descent(s)[source]
 
Return the string bounding box and the maximal descent. 
   get_underline_thickness()[source]
 
Return the underline thickness as float. 
   get_vertical_stem_width()[source]
 
Return the standard vertical stem width as float, or None if not specified in AFM file. 
   get_weight()[source]
 
Return the font weight, e.g., 'Bold' or 'Roman'. 
   get_width_char(c, isord=False)[source]
 
Get the width of the character from the character metric WX field. 
   get_width_from_char_name(name)[source]
 
Get the width of the character from a type1 character name. 
   get_xheight()[source]
 
Return the xheight as float. 
   propertypostscript_name

   string_width_height(s)[source]
 
Return the string width (including kerning) and string height as a (w, h) tuple.
get_familyname()[source]
 
Return the font family name, e.g., 'Times'.
get_fontname()[source]
 
Return the font name, e.g., 'Times-Roman'.
get_fullname()[source]
 
Return the font full name, e.g., 'Times-Roman'.
get_height_char(c, isord=False)[source]
 
Get the bounding box (ink) height of character c (space is 0).
get_horizontal_stem_width()[source]
 
Return the standard horizontal stem width as float, or None if not specified in AFM file.
get_kern_dist(c1, c2)[source]
 
Return the kerning pair distance (possibly 0) for chars c1 and c2.
get_kern_dist_from_name(name1, name2)[source]
 
Return the kerning pair distance (possibly 0) for chars name1 and name2.
get_name_char(c, isord=False)[source]
 
Get the name of the character, i.e., ';' is 'semicolon'.
get_str_bbox_and_descent(s)[source]
 
Return the string bounding box and the maximal descent.
get_vertical_stem_width()[source]
 
Return the standard vertical stem width as float, or None if not specified in AFM file.
get_weight()[source]
 
Return the font weight, e.g., 'Bold' or 'Roman'.
get_width_char(c, isord=False)[source]
 
Get the width of the character from the character metric WX field.
get_width_from_char_name(name)[source]
 
Get the width of the character from a type1 character name.
string_width_height(s)[source]
 
Return the string width (including kerning) and string height as a (w, h) tuple.
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 the character (B) as a tuple (llx, lly, urx, ury). 
   name
 
The character name (N). 
   width
 
The character width (WX).
bbox
 
The bbox of the character (B) as a tuple (llx, lly, urx, ury).
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 part, e.g. 'acute'.
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 process and finish() is called afterwards. This class is set up to provide for writing movie frame data to a pipe. saving() is provided as a context manager to facilitate this process as: with moviewriter.saving(fig, outfile='myfile.mp4', dpi=100):
    # Iterate over frames
    moviewriter.grab_frame(**savefig_kwargs)
 The use of the context manager ensures that setup() and finish() are performed as necessary. An instance of a concrete subclass of this class can be given as the writer argument of Animation.save().   __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_frame(**savefig_kwargs) Grab the image information from the figure and save as a movie frame.  
saving(fig, outfile, dpi, *args, **kwargs) Context manager to facilitate writing the movie file.  
setup(fig, outfile[, dpi]) Setup for writing the movie file.   Attributes  
frame_size A tuple (width, height) in pixels of a movie frame.     abstractfinish()[source]
 
Finish any processing for writing the movie. 
   propertyframe_size
 
A tuple (width, height) in pixels of a movie frame. 
   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. 
   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. 
   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 pixels of the resulting movie file.
__init__(fps=5, metadata=None, codec=None, bitrate=None)[source]
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.
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.
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 pixels of the resulting movie file.
new_saved_frame_seq()[source]
 
Return a new sequence of saved/cached frame information.
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.  
writerMovieWriter or str, default: rcParams["animation.writer"] (default: 'ffmpeg')


A MovieWriter instance to use or a key that identifies a class to use, such as 'ffmpeg'.  
fpsint, optional


Movie frame rate (per second). If not set, the frame rate from the animation's frame interval.  
dpifloat, default: rcParams["savefig.dpi"] (default: 'figure')


Controls the dots per inch for the movie frames. Together with the figure's size in inches, this controls the size of the movie.  
codecstr, default: rcParams["animation.codec"] (default: 'h264').


The video codec to use. Not all codecs are supported by a given MovieWriter.  
bitrateint, default: rcParams["animation.bitrate"] (default: -1)


The bitrate of the movie, in kilobits per second. Higher values means higher quality movies, but increase the file size. A value of -1 lets the underlying movie encoder select the bitrate.  
extra_argslist of str or None, optional


Extra command-line arguments passed to the underlying movie encoder. The default, None, means to use rcParams["animation.[name-of-encoder]_args"] for the builtin writers.  
metadatadict[str, str], default: {}


Dictionary of keys and values for metadata to include in the output file. Some keys that may be of use include: title, artist, genre, subject, copyright, srcform, comment.  
extra_animlist, default: []


Additional Animation objects that should be included in the saved movie file. These need to be from the same matplotlib.figure.Figure instance. Also, animation frames will just be simply combined, so there should be a 1:1 correspondence between the frames from the different animations.  
savefig_kwargsdict, default: {}


Keyword arguments passed to each savefig call used to save the individual frames.  
progress_callbackfunction, optional


A callback function that will be called for every frame to notify the saving progress. It must have the signature def func(current_frame: int, total_frames: int) -> Any
 where current_frame is the current frame number and total_frames is the total number of frames to be saved. total_frames is set to None, if the total number of frames can not be determined. Return values may exist but are ignored. Example code to write the progress to stdout: progress_callback =                    lambda i, n: print(f'Saving frame {i} of {n}')
     Notes fps, codec, bitrate, extra_args and metadata are used to construct a MovieWriter instance and can only be passed if writer is a string. If they are passed as non-None and writer is a MovieWriter, a RuntimeError will be raised.
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 the interval to control the speed, and uses the repeat parameter to decide whether to loop.  Parameters 
 
embed_limitfloat, optional


Limit, in MB, of the returned animation. No animation is created if the limit is exceeded. Defaults to rcParams["animation.embed_limit"] (default: 20.0) = 20.0.    Returns 
 str

An HTML5 video tag with the animation embedded as base64 encoded h264 video. If the embed_limit is exceeded, this returns the string "Video too large to embed."
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 the animation ends. Must be one of {'loop',
'once', 'reflect'}. Defaults to 'loop' if self.repeat is True, otherwise 'once'.
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 variable that lives as long as the animation should run. Otherwise, the Animation object will be garbage-collected and the animation stops.   Parameters 
 
figFigure


The figure object used to get needed events, such as draw or resize.  
artistslist


Each list entry is a collection of Artist objects that are made visible on the corresponding frame. Other artists are made invisible.  
intervalint, default: 200


Delay between frames in milliseconds.  
repeat_delayint, default: 0


The delay in milliseconds between consecutive animation runs, if repeat is True.  
repeatbool, default: True


Whether the animation repeats when the sequence of frames is completed.  
blitbool, default: False


Whether blitting is used to optimize drawing.       __init__(fig, artists, *args, **kwargs)[source]

 Methods  
__init__(fig, artists, *args, **kwargs)   
new_frame_seq() Return a new sequence of frame information.  
new_saved_frame_seq() Return a new sequence of saved/cached frame information.  
pause() Pause the animation.  
resume() Resume the animation.  
save(filename[, writer, fps, dpi, codec, ...]) Save the animation as a movie file by drawing every frame.  
to_html5_video([embed_limit]) Convert the animation to an HTML5 <video> tag.  
to_jshtml([fps, embed_frames, default_mode]) Generate HTML representation of the animation.
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.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 binary path to the commandline tool used by a specific subclass.  
cleanup() [Deprecated]  
finish() Finish any processing for writing the movie.  
grab_frame(**savefig_kwargs) Grab the image information from the figure and save as a movie frame.  
isAvailable() Return whether a MovieWriter subclass is actually available.  
saving(fig, outfile, dpi, *args, **kwargs) Context manager to facilitate writing the movie file.  
setup(fig, outfile[, dpi, frame_prefix]) Setup for writing the movie file.   Attributes  
frame_format Format (png, jpeg, etc.) to use for saving the frames, which can be decided by the individual subclasses.  
frame_size A tuple (width, height) in pixels of a movie frame.  
output_args   
supported_formats      supported_formats=['png', 'jpeg', 'tiff', 'raw', 'rgba']
supported_formats=['png', 'jpeg', 'tiff', 'raw', 'rgba']
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).  
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. Higher values means higher quality movies, but increase the file size. A value of -1 lets the underlying movie encoder select the bitrate.  
extra_argslist of str or None, optional


Extra command-line arguments passed to the underlying movie encoder. The default, None, means to use rcParams["animation.[name-of-encoder]_args"] for the builtin writers.  
metadatadict[str, str], default: {}


A dictionary of keys and values for metadata to include in the output file. Some keys that may be of use include: title, artist, genre, subject, copyright, srcform, comment.       __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 bitrate of the movie, in kilobits per second. Higher values means higher quality movies, but increase the file size. A value of -1 lets the underlying movie encoder select the bitrate.  
extra_argslist of str or None, optional


Extra command-line arguments passed to the underlying movie encoder. The default, None, means to use rcParams["animation.[name-of-encoder]_args"] for the builtin writers.  
metadatadict[str, str], default: {}


A dictionary of keys and values for metadata to include in the output file. Some keys that may be of use include: title, artist, genre, subject, copyright, srcform, comment.     
 Methods  
__init__([fps, codec, bitrate, extra_args, ...]) 
 Parameters    
bin_path() Return the binary path to the commandline tool used by a specific subclass.  
cleanup() [Deprecated]  
finish() Finish any processing for writing the movie.  
grab_frame(**savefig_kwargs) Grab the image information from the figure and save as a movie frame.  
isAvailable() Return whether a MovieWriter subclass is actually available.  
saving(fig, outfile, dpi, *args, **kwargs) Context manager to facilitate writing the movie file.  
setup(fig, outfile[, dpi]) Setup for writing the movie file.   Attributes  
frame_size A tuple (width, height) in pixels of a movie frame.  
output_args   
supported_formats
__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 bitrate of the movie, in kilobits per second. Higher values means higher quality movies, but increase the file size. A value of -1 lets the underlying movie encoder select the bitrate.  
extra_argslist of str or None, optional


Extra command-line arguments passed to the underlying movie encoder. The default, None, means to use rcParams["animation.[name-of-encoder]_args"] for the builtin writers.  
metadatadict[str, str], default: {}


A dictionary of keys and values for metadata to include in the output file. Some keys that may be of use include: title, artist, genre, subject, copyright, srcform, comment.
__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. Higher values means higher quality movies, but increase the file size. A value of -1 lets the underlying movie encoder select the bitrate.  
extra_argslist of str or None, optional


Extra command-line arguments passed to the underlying movie encoder. The default, None, means to use rcParams["animation.[name-of-encoder]_args"] for the builtin writers.  
metadatadict[str, str], default: {}


A dictionary of keys and values for metadata to include in the output file. Some keys that may be of use include: title, artist, genre, subject, copyright, srcform, comment.
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.
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 the size in pixels of the resulting movie file.  
frame_prefixstr, optional


The filename prefix to use for temporary files. If None (the default), files are written to a temporary directory which is deleted by cleanup; if not None, no temporary files are deleted.
__init__(fig, func, frames=None, init_func=None, fargs=None, save_count=None, *, cache_frame_data=True, **kwargs)[source]
__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, default: rcParams["animation.bitrate"] (default: -1)


The bitrate of the movie, in kilobits per second. Higher values means higher quality movies, but increase the file size. A value of -1 lets the underlying movie encoder select the bitrate.  
extra_argslist of str or None, optional


Extra command-line arguments passed to the underlying movie encoder. The default, None, means to use rcParams["animation.[name-of-encoder]_args"] for the builtin writers.  
metadatadict[str, str], default: {}


A dictionary of keys and values for metadata to include in the output file. Some keys that may be of use include: title, artist, genre, subject, copyright, srcform, comment.
classmethodisAvailable()[source]
 
Return whether a MovieWriter subclass is actually available.