neulab/docprompting-conala huggingface dataset:
set(*, agg_filter=<UNSET>, alpha=<UNSET>, angle=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, bounds=<UNSET>, capstyle=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, color=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, fill=<UNSET>, fontsize=<UNSET>, gid=<UNSET>, hatch=<UNSET>, height=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, text_props=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, width=<UNSET>, x=<UNSET>, xy=<UNSET>, y=<UNSET>, zorder=<UNSET>)[source]
 
Set multiple properties at once. Supported properties are   
Property Description   
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array  
alpha scalar or None  
angle unknown  
animated bool  
antialiased or aa bool or None  
bounds (left, bottom, width, height)  
capstyle CapStyle or {'butt', 'projecting', 'round'}  
clip_box Bbox  
clip_on bool  
clip_path Patch or (Path, Transform) or None  
color color  
edgecolor or ec color or None  
facecolor or fc color or None  
figure unknown  
fill bool  
fontsize unknown  
gid str  
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}  
height unknown  
in_layout bool  
joinstyle JoinStyle or {'miter', 'round', 'bevel'}  
label object  
linestyle or ls {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}  
linewidth or lw float or None  
path_effects AbstractPathEffect  
picker None or bool or float or callable  
rasterized bool  
sketch_params (scale: float, length: float, randomness: float)  
snap bool or None  
text_props unknown  
transform unknown  
url str  
visible bool  
width unknown  
x unknown  
xy (float, float)  
y unknown  
zorder float
set_text_props(**kwargs)[source]
 
Update the text properties. Valid keyword arguments are:   
Property Description   
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array  
alpha scalar or None  
animated bool  
backgroundcolor color  
bbox dict with properties for patches.FancyBboxPatch  
clip_box unknown  
clip_on unknown  
clip_path unknown  
color or c color  
figure Figure  
fontfamily or family {FONTNAME, 'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'}  
fontproperties or font or font_properties font_manager.FontProperties or str or pathlib.Path  
fontsize or size float or {'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'}  
fontstretch or stretch {a numeric value in range 0-1000, 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'}  
fontstyle or style {'normal', 'italic', 'oblique'}  
fontvariant or variant {'normal', 'small-caps'}  
fontweight or weight {a numeric value in range 0-1000, 'ultralight', 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black'}  
gid str  
horizontalalignment or ha {'center', 'right', 'left'}  
in_layout bool  
label object  
linespacing float (multiple of font size)  
math_fontfamily str  
multialignment or ma {'left', 'right', 'center'}  
parse_math bool  
path_effects AbstractPathEffect  
picker None or bool or float or callable  
position (float, float)  
rasterized bool  
rotation float or {'vertical', 'horizontal'}  
rotation_mode {None, 'default', 'anchor'}  
sketch_params (scale: float, length: float, randomness: float)  
snap bool or None  
text object  
transform Transform  
transform_rotates_text bool  
url str  
usetex bool or None  
verticalalignment or va {'center', 'top', 'bottom', 'baseline', 'center_baseline'}  
visible bool  
wrap bool  
x float  
y float  
zorder float
set_transform(trans)[source]
 
Set the artist transform.  Parameters 
 
tTransform
matplotlib.table.table(ax, cellText=None, cellColours=None, cellLoc='right', colWidths=None, rowLabels=None, rowColours=None, rowLoc='left', colLabels=None, colColours=None, colLoc='center', loc='bottom', bbox=None, edges='closed', **kwargs)[source]
 
Add a table to an Axes. At least one of cellText or cellColours must be specified. These parameters must be 2D lists, in which the outer lists define the rows and the inner list define the column values per row. Each row must have the same number of elements. The table can optionally have row and column headers, which are configured using rowLabels, rowColours, rowLoc and colLabels, colColours, colLoc respectively. For finer grained control over tables, use the Table class and add it to the axes with Axes.add_table.  Parameters 
 
cellText2D list of str, optional


The texts to place into the table cells. Note: Line breaks in the strings are currently not accounted for and will result in the text exceeding the cell boundaries.  
cellColours2D list of colors, optional


The background colors of the cells.  
cellLoc{'left', 'center', 'right'}, default: 'right'


The alignment of the text within the cells.  
colWidthslist of float, optional


The column widths in units of the axes. If not given, all columns will have a width of 1 / ncols.  
rowLabelslist of str, optional


The text of the row header cells.  
rowColourslist of colors, optional


The colors of the row header cells.  
rowLoc{'left', 'center', 'right'}, default: 'left'


The text alignment of the row header cells.  
colLabelslist of str, optional


The text of the column header cells.  
colColourslist of colors, optional


The colors of the column header cells.  
colLoc{'left', 'center', 'right'}, default: 'left'


The text alignment of the column header cells.  
locstr, optional


The position of the cell with respect to ax. This must be one of the codes.  
bboxBbox, optional


A bounding box to draw the table into. If this is not None, this overrides loc.  
edgessubstring of 'BRTL' or {'open', 'closed', 'horizontal', 'vertical'}


The cell edges to be drawn with a line. See also visible_edges.    Returns 
 Table

The created table.    Other Parameters 
 **kwargs

Table properties.   
Property Description   
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array  
alpha scalar or None  
animated bool  
clip_box Bbox  
clip_on bool  
clip_path Patch or (Path, Transform) or None  
figure Figure  
fontsize float  
gid str  
in_layout bool  
label object  
path_effects AbstractPathEffect  
picker None or bool or float or callable  
rasterized bool  
sketch_params (scale: float, length: float, randomness: float)  
snap bool or None  
transform Transform  
url str  
visible bool  
zorder float
add_cell(row, col, *args, **kwargs)[source]
 
Create a cell and add it to the table.  Parameters 
 
rowint


Row index.  
colint


Column index.  *args, **kwargs

All other parameters are passed on to Cell.    Returns 
 Cell

The created cell.
auto_set_column_width(col)[source]
 
Automatically set the widths of given columns to optimal sizes.  Parameters 
 
colint or sequence of ints


The indices of the columns to auto-scale.
auto_set_font_size(value=True)[source]
 
Automatically set font size.
AXESPAD=0.02
 
The border between the Axes and the table edge in Axes units.
codes={'best': 0, 'bottom': 17, 'bottom left': 12, 'bottom right': 13, 'center': 9, 'center left': 5, 'center right': 6, 'left': 15, 'lower center': 7, 'lower left': 3, 'lower right': 4, 'right': 14, 'top': 16, 'top left': 11, 'top right': 10, 'upper center': 8, 'upper left': 2, 'upper right': 1}
 
Possible values where to place the table relative to the Axes.
get_celld()[source]
 
Return a dict of cells in the table mapping (row, column) to Cells. Notes You can also directly index into the Table object to access individual cells: cell = table[row, col]
scale(xscale, yscale)[source]
 
Scale column widths by xscale and row heights by yscale.
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, fontsize=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]
 
Set multiple properties at once. Supported properties are   
Property Description   
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array  
alpha scalar or None  
animated bool  
clip_box Bbox  
clip_on bool  
clip_path Patch or (Path, Transform) or None  
figure Figure  
fontsize float  
gid str  
in_layout bool  
label object  
path_effects AbstractPathEffect  
picker None or bool or float or callable  
rasterized bool  
sketch_params (scale: float, length: float, randomness: float)  
snap bool or None  
transform Transform  
url str  
visible bool  
zorder float
set_fontsize(size)[source]
 
Set the font size, in points, of the cell text.  Parameters 
 
sizefloat

   Notes As long as auto font size has not been disabled, the value will be clipped such that the text fits horizontally into the cell. You can disable this behavior using auto_set_font_size. >>> the_table.auto_set_font_size(False)
>>> the_table.set_fontsize(20)
 However, there is no automatic scaling of the row height so that the text may exceed the cell boundary.
matplotlib.test(verbosity=None, coverage=False, **kwargs)[source]
 
[Deprecated] Run the matplotlib test suite. Notes  Deprecated since version 3.5.
matplotlib.testing.compare.calculate_rms(expected_image, actual_image)[source]
 
Calculate the per-pixel errors, then compute the root mean square error.
matplotlib.testing.compare.comparable_formats()[source]
 
Return the list of file formats that compare_images can compare on this system.  Returns 
 list of str

E.g. ['png', 'pdf', 'svg', 'eps'].
matplotlib.testing.compare.compare_images(expected, actual, tol, in_decorator=False)[source]
 
Compare two "image" files checking differences within a tolerance. The two given filenames may point to files which are convertible to PNG via the converter dictionary. The underlying RMS is calculated with the calculate_rms function.  Parameters 
 
expectedstr


The filename of the expected image.  
actualstr


The filename of the actual image.  
tolfloat


The tolerance (a color value difference, where 255 is the maximal difference). The test fails if the average pixel difference is greater than this value.  
in_decoratorbool


Determines the output format. If called from image_comparison decorator, this should be True. (default=False)    Returns 
 None or dict or str

Return None if the images are equal within the given tolerance. If the images differ, the return value depends on in_decorator. If in_decorator is true, a dict with the following entries is returned:  
rms: The RMS of the image difference. 
expected: The filename of the expected image. 
actual: The filename of the actual image. 
diff_image: The filename of the difference image. 
tol: The comparison tolerance.  Otherwise, a human-readable multi-line string representation of this information is returned.     Examples img1 = "./baseline/plot.png"
img2 = "./output/plot.png"
compare_images(img1, img2, 0.001)
matplotlib.testing.decorators.check_figures_equal(*, extensions=('png', 'pdf', 'svg'), tol=0)[source]
 
Decorator for test cases that generate and compare two figures. The decorated function must take two keyword arguments, fig_test and fig_ref, and draw the test and reference images on them. After the function returns, the figures are saved and compared. This decorator should be preferred over image_comparison when possible in order to keep the size of the test suite from ballooning.  Parameters 
 
extensionslist, default: ["png", "pdf", "svg"]


The extensions to test.  
tolfloat


The RMS threshold above which the test is considered failed.    Raises 
 RuntimeError

If any new figures are created (and not subsequently closed) inside the test function.     Examples Check that calling Axes.plot with a single argument plots it against [0, 1, 2, ...]: @check_figures_equal()
def test_plot(fig_test, fig_ref):
    fig_test.subplots().plot([1, 3, 5])
    fig_ref.subplots().plot([0, 1, 2], [1, 3, 5])
matplotlib.testing.decorators.cleanup(style=None)[source]
 
A decorator to ensure that any global state is reset before running a test.  Parameters 
 
stylestr, dict, or list, optional


The style(s) to apply. Defaults to ["classic",
"_classic_test_patch"].
classmatplotlib.testing.decorators.CleanupTestCase(methodName='runTest')[source]
 
Bases: unittest.case.TestCase A wrapper for unittest.TestCase that includes cleanup operations. Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.   classmethodsetUpClass()[source]
 
Hook method for setting up class fixture before running tests in the class. 
   classmethodtearDownClass()[source]
 
Hook method for deconstructing the class fixture after running all tests in the class.
classmethodsetUpClass()[source]
 
Hook method for setting up class fixture before running tests in the class.
classmethodtearDownClass()[source]
 
Hook method for deconstructing the class fixture after running all tests in the class.
matplotlib.testing.decorators.image_comparison(baseline_images, extensions=None, tol=0, freetype_version=None, remove_text=False, savefig_kwarg=None, style=('classic', '_classic_test_patch'))[source]
 
Compare images generated by the test with those specified in baseline_images, which must correspond, else an ImageComparisonFailure exception will be raised.  Parameters 
 
baseline_imageslist or None


A list of strings specifying the names of the images generated by calls to Figure.savefig. If None, the test function must use the baseline_images fixture, either as a parameter or with pytest.mark.usefixtures. This value is only allowed when using pytest.  
extensionsNone or list of str


The list of extensions to test, e.g. ['png', 'pdf']. If None, defaults to all supported extensions: png, pdf, and svg. When testing a single extension, it can be directly included in the names passed to baseline_images. In that case, extensions must not be set. In order to keep the size of the test suite from ballooning, we only include the svg or pdf outputs if the test is explicitly exercising a feature dependent on that backend (see also the check_figures_equal decorator for that purpose).  
tolfloat, default: 0


The RMS threshold above which the test is considered failed. Due to expected small differences in floating-point calculations, on 32-bit systems an additional 0.06 is added to this threshold.  
freetype_versionstr or tuple


The expected freetype version or range of versions for this test to pass.  
remove_textbool


Remove the title and tick text from the figure before comparison. This is useful to make the baseline images independent of variations in text rendering between different versions of FreeType. This does not remove other, more deliberate, text, such as legends and annotations.  
savefig_kwargdict


Optional arguments that are passed to the savefig method.  
stylestr, dict, or list


The optional style(s) to apply to the image test. The test itself can also apply additional styles if desired. Defaults to ["classic",
"_classic_test_patch"].
exceptionmatplotlib.testing.exceptions.ImageComparisonFailure[source]
 
Bases: AssertionError Raise this exception to mark a test as a comparison between two images.
matplotlib.texmanager Support for embedded TeX expressions in Matplotlib. Requirements:  LaTeX. *Agg backends: dvipng>=1.6. PS backend: PSfrag, dvips, and Ghostscript>=9.0. PDF and SVG backends: if LuaTeX is present, it will be used to speed up some post-processing steps, but note that it is not used to parse the TeX string itself (only LaTeX is supported).  To enable TeX rendering of all text in your Matplotlib figure, set rcParams["text.usetex"] (default: False) to True. TeX and dvipng/dvips processing results are cached in ~/.matplotlib/tex.cache for reuse between sessions. TexManager.get_rgba can also be used to directly obtain raster output as RGBA NumPy arrays.   classmatplotlib.texmanager.TexManager[source]
 
Bases: object Convert strings to dvi files using TeX, caching the results to a directory. Repeated calls to this constructor always return the same instance.   propertyfont_families[source]

   propertyfont_family[source]

   propertyfont_info[source]

   get_basefile(tex, fontsize, dpi=None)[source]
 
Return a filename based on a hash of the string, fontsize, and dpi. 
   get_custom_preamble()[source]
 
Return a string containing user additions to the tex preamble. 
   get_font_config()[source]

   get_font_preamble()[source]
 
Return a string containing font configuration for the tex preamble. 
   get_grey(tex, fontsize=None, dpi=None)[source]
 
Return the alpha channel. 
   get_rgba(tex, fontsize=None, dpi=None, rgb=(0, 0, 0))[source]
 
Return latex's rendering of the tex string as an rgba array. Examples >>> texmanager = TexManager()
>>> s = r"\TeX\ is $\displaystyle\sum_n\frac{-e^{i\pi}}{2^n}$!"
>>> Z = texmanager.get_rgba(s, fontsize=12, dpi=80, rgb=(1, 0, 0))
 
   get_text_width_height_descent(tex, fontsize, renderer=None)[source]
 
Return width, height and descent of the text. 
   propertygrey_arrayd[source]

   make_dvi(tex, fontsize)[source]
 
Generate a dvi file containing latex's layout of tex string. Return the file name. 
   make_png(tex, fontsize, dpi)[source]
 
Generate a png file containing latex's rendering of tex string. Return the file name. 
   make_tex(tex, fontsize)[source]
 
Generate a tex file to render the tex string at a specific font size. Return the file name. 
   texcache='/home/elliott/.cache/matplotlib/tex.cache'
classmatplotlib.texmanager.TexManager[source]
 
Bases: object Convert strings to dvi files using TeX, caching the results to a directory. Repeated calls to this constructor always return the same instance.   propertyfont_families[source]

   propertyfont_family[source]

   propertyfont_info[source]

   get_basefile(tex, fontsize, dpi=None)[source]
 
Return a filename based on a hash of the string, fontsize, and dpi. 
   get_custom_preamble()[source]
 
Return a string containing user additions to the tex preamble. 
   get_font_config()[source]

   get_font_preamble()[source]
 
Return a string containing font configuration for the tex preamble. 
   get_grey(tex, fontsize=None, dpi=None)[source]
 
Return the alpha channel. 
   get_rgba(tex, fontsize=None, dpi=None, rgb=(0, 0, 0))[source]
 
Return latex's rendering of the tex string as an rgba array. Examples >>> texmanager = TexManager()
>>> s = r"\TeX\ is $\displaystyle\sum_n\frac{-e^{i\pi}}{2^n}$!"
>>> Z = texmanager.get_rgba(s, fontsize=12, dpi=80, rgb=(1, 0, 0))
 
   get_text_width_height_descent(tex, fontsize, renderer=None)[source]
 
Return width, height and descent of the text. 
   propertygrey_arrayd[source]

   make_dvi(tex, fontsize)[source]
 
Generate a dvi file containing latex's layout of tex string. Return the file name. 
   make_png(tex, fontsize, dpi)[source]
 
Generate a png file containing latex's rendering of tex string. Return the file name. 
   make_tex(tex, fontsize)[source]
 
Generate a tex file to render the tex string at a specific font size. Return the file name. 
   texcache='/home/elliott/.cache/matplotlib/tex.cache'
get_basefile(tex, fontsize, dpi=None)[source]
 
Return a filename based on a hash of the string, fontsize, and dpi.
get_custom_preamble()[source]
 
Return a string containing user additions to the tex preamble.
get_font_preamble()[source]
 
Return a string containing font configuration for the tex preamble.
get_grey(tex, fontsize=None, dpi=None)[source]
 
Return the alpha channel.
get_rgba(tex, fontsize=None, dpi=None, rgb=(0, 0, 0))[source]
 
Return latex's rendering of the tex string as an rgba array. Examples >>> texmanager = TexManager()
>>> s = r"\TeX\ is $\displaystyle\sum_n\frac{-e^{i\pi}}{2^n}$!"
>>> Z = texmanager.get_rgba(s, fontsize=12, dpi=80, rgb=(1, 0, 0))
get_text_width_height_descent(tex, fontsize, renderer=None)[source]
 
Return width, height and descent of the text.
make_dvi(tex, fontsize)[source]
 
Generate a dvi file containing latex's layout of tex string. Return the file name.
make_png(tex, fontsize, dpi)[source]
 
Generate a png file containing latex's rendering of tex string. Return the file name.
make_tex(tex, fontsize)[source]
 
Generate a tex file to render the tex string at a specific font size. Return the file name.
contains(event)[source]
 
Return whether the mouse event occurred inside the axis-aligned bounding-box of the text.
get_anncoords()[source]
 
Return the coordinate system to use for Annotation.xyann. See also xycoords in Annotation.
get_window_extent(renderer=None)[source]
 
Return the Bbox bounding the text, in display units. In addition to being used internally, this is useful for specifying clickable regions in a png file on a web page.  Parameters 
 
rendererRenderer, optional


A renderer is needed to compute the bounding box. If the artist has already been drawn, the renderer is cached; thus, it is only necessary to pass this argument when calling get_window_extent before the first draw. In practice, it is usually easier to trigger a draw first (e.g. by saving the figure).  
dpifloat, optional


The dpi value for computing the bbox, defaults to self.figure.dpi (not the renderer dpi); should be set e.g. if to match regions with a figure saved with a custom dpi value.