neulab/docprompting-conala huggingface dataset:
axisinfo(unit, axis)[source]
 
Return the AxisInfo for unit. unit is a tzinfo instance or None. The axis argument is required but not used.
classmatplotlib.dates.ConciseDateFormatter(locator, tz=None, formats=None, offset_formats=None, zero_formats=None, show_offset=True, *, usetex=None)[source]
 
Bases: matplotlib.ticker.Formatter A Formatter which attempts to figure out the best format to use for the date, and to make it as compact as possible, but still be complete. This is most useful when used with the AutoDateLocator: >>> locator = AutoDateLocator()
>>> formatter = ConciseDateFormatter(locator)
  Parameters 
 
locatorticker.Locator


Locator that this axis is using.  
tzstr, optional


Passed to dates.date2num.  
formatslist of 6 strings, optional


Format strings for 6 levels of tick labelling: mostly years, months, days, hours, minutes, and seconds. Strings use the same format codes as strftime. Default is ['%Y', '%b', '%d', '%H:%M', '%H:%M', '%S.%f']  
zero_formatslist of 6 strings, optional


Format strings for tick labels that are "zeros" for a given tick level. For instance, if most ticks are months, ticks around 1 Jan 2005 will be labeled "Dec", "2005", "Feb". The default is ['', '%Y', '%b', '%b-%d', '%H:%M', '%H:%M']  
offset_formatslist of 6 strings, optional


Format strings for the 6 levels that is applied to the "offset" string found on the right side of an x-axis, or top of a y-axis. Combined with the tick labels this should completely specify the date. The default is: ['', '%Y', '%Y-%b', '%Y-%b-%d', '%Y-%b-%d', '%Y-%b-%d %H:%M']
  
show_offsetbool, default: True


Whether to show the offset or not.  
usetexbool, default: rcParams["text.usetex"] (default: False)


To enable/disable the use of TeX's math mode for rendering the results of the formatter.     Examples See Formatting date ticks using ConciseDateFormatter (Source code, png, pdf)    Autoformat the date labels. The default format is used to form an initial string, and then redundant elements are removed.   format_data_short(value)[source]
 
Return a short string version of the tick value. Defaults to the position-independent long value. 
   format_ticks(values)[source]
 
Return the tick labels for all the ticks at once. 
   get_offset()[source]
format_data_short(value)[source]
 
Return a short string version of the tick value. Defaults to the position-independent long value.
matplotlib.dates.date2num(d)[source]
 
Convert datetime objects to Matplotlib dates.  Parameters 
 
ddatetime.datetime or numpy.datetime64 or sequences of these

  Returns 
 float or sequence of floats

Number of days since the epoch. See get_epoch for the epoch, which can be changed by rcParams["date.epoch"] (default: '1970-01-01T00:00:00') or set_epoch. If the epoch is "1970-01-01T00:00:00" (default) then noon Jan 1 1970 ("1970-01-01T12:00:00") returns 0.5.     Notes The Gregorian calendar is assumed; this is not universal practice. For details see the module docstring.
classmatplotlib.dates.DateConverter(*, interval_multiples=True)[source]
 
Bases: matplotlib.units.ConversionInterface Converter for datetime.date and datetime.datetime data, or for date/time data represented as it would be converted by date2num. The 'unit' tag for such data is None or a tzinfo instance.   axisinfo(unit, axis)[source]
 
Return the AxisInfo for unit. unit is a tzinfo instance or None. The axis argument is required but not used. 
   staticconvert(value, unit, axis)[source]
 
If value is not already a number or sequence of numbers, convert it with date2num. The unit and axis arguments are not used. 
   staticdefault_units(x, axis)[source]
 
Return the tzinfo instance of x or of its first element, or None
staticconvert(value, unit, axis)[source]
 
If value is not already a number or sequence of numbers, convert it with date2num. The unit and axis arguments are not used.
staticdefault_units(x, axis)[source]
 
Return the tzinfo instance of x or of its first element, or None
classmatplotlib.dates.DateFormatter(fmt, tz=None, *, usetex=None)[source]
 
Bases: matplotlib.ticker.Formatter Format a tick (in days since the epoch) with a strftime format string.  Parameters 
 
fmtstr


strftime format string  
tzdatetime.tzinfo, default: rcParams["timezone"] (default: 'UTC')


Ticks timezone.  
usetexbool, default: rcParams["text.usetex"] (default: False)


To enable/disable the use of TeX's math mode for rendering the results of the formatter.       set_tzinfo(tz)[source]
classmatplotlib.dates.DateLocator(tz=None)[source]
 
Bases: matplotlib.ticker.Locator Determines the tick locations when plotting dates. This class is subclassed by other Locators and is not meant to be used on its own.  Parameters 
 
tzdatetime.tzinfo

     datalim_to_dt()[source]
 
Convert axis data interval to datetime objects. 
   hms0d={'byhour': 0, 'byminute': 0, 'bysecond': 0}

   nonsingular(vmin, vmax)[source]
 
Given the proposed upper and lower extent, adjust the range if it is too close to being singular (i.e. a range of ~0). 
   set_tzinfo(tz)[source]
 
Set time zone info. 
   viewlim_to_dt()[source]
 
Convert the view interval to datetime objects.
datalim_to_dt()[source]
 
Convert axis data interval to datetime objects.
hms0d={'byhour': 0, 'byminute': 0, 'bysecond': 0}
viewlim_to_dt()[source]
 
Convert the view interval to datetime objects.
matplotlib.dates.datestr2num(d, default=None)[source]
 
Convert a date string to a datenum using dateutil.parser.parse.  Parameters 
 
dstr or sequence of str


The dates to convert.  
defaultdatetime.datetime, optional


The default date to use when fields are missing in d.
classmatplotlib.dates.DayLocator(bymonthday=None, interval=1, tz=None)[source]
 
Bases: matplotlib.dates.RRuleLocator Make ticks on occurrences of each day of the month. For example, 1, 15, 30. Mark every day in bymonthday; bymonthday can be an int or sequence. Default is to tick every day of the month: bymonthday=range(1, 32).
matplotlib.dates.drange(dstart, dend, delta)[source]
 
Return a sequence of equally spaced Matplotlib dates. The dates start at dstart and reach up to, but not including dend. They are spaced by delta.  Parameters 
 
dstart, denddatetime


The date limits.  
deltadatetime.timedelta


Spacing of the dates.    Returns 
 numpy.array

A list floats representing Matplotlib dates.
matplotlib.dates.epoch2num(e)[source]
 
[Deprecated] Convert UNIX time to days since Matplotlib epoch.  Parameters 
 
elist of floats


Time in seconds since 1970-01-01.    Returns 
 numpy.array

Time in days since Matplotlib epoch (see get_epoch()).     Notes  Deprecated since version 3.5.
matplotlib.dates.get_epoch()[source]
 
Get the epoch used by dates.  Returns 
 
epochstr


String for the epoch (parsable by numpy.datetime64).
classmatplotlib.dates.HourLocator(byhour=None, interval=1, tz=None)[source]
 
Bases: matplotlib.dates.RRuleLocator Make ticks on occurrences of each hour. Mark every hour in byhour; byhour can be an int or sequence. Default is to tick every hour: byhour=range(24) interval is the interval between each iteration. For example, if interval=2, mark every second occurrence.
classmatplotlib.dates.MicrosecondLocator(interval=1, tz=None)[source]
 
Bases: matplotlib.dates.DateLocator Make ticks on regular intervals of one or more microsecond(s).  Note By default, Matplotlib uses a floating point representation of time in days since the epoch, so plotting data with microsecond time resolution does not work well for dates that are far (about 70 years) from the epoch (check with get_epoch). If you want sub-microsecond resolution time plots, it is strongly recommended to use floating point seconds, not datetime-like time representation. If you really must use datetime.datetime() or similar and still need microsecond precision, change the time origin via dates.set_epoch to something closer to the dates being plotted. See Date Precision and Epochs.  interval is the interval between each iteration. For example, if interval=2, mark every second microsecond.   set_axis(axis)[source]

   set_data_interval(vmin, vmax)[source]
 
[Deprecated] Notes  Deprecated since version 3.5:   
   set_view_interval(vmin, vmax)[source]
 
[Deprecated] Notes  Deprecated since version 3.5:   
   tick_values(vmin, vmax)[source]
 
Return the values of the located ticks given vmin and vmax.  Note To get tick locations with the vmin and vmax values defined automatically for the associated axis simply call the Locator instance: >>> print(type(loc))
<type 'Locator'>
>>> print(loc())
[1, 2, 3, 4]
set_data_interval(vmin, vmax)[source]
 
[Deprecated] Notes  Deprecated since version 3.5:
set_view_interval(vmin, vmax)[source]
 
[Deprecated] Notes  Deprecated since version 3.5:
classmatplotlib.dates.MinuteLocator(byminute=None, interval=1, tz=None)[source]
 
Bases: matplotlib.dates.RRuleLocator Make ticks on occurrences of each minute. Mark every minute in byminute; byminute can be an int or sequence. Default is to tick every minute: byminute=range(60) interval is the interval between each iteration. For example, if interval=2, mark every second occurrence.
classmatplotlib.dates.MonthLocator(bymonth=None, bymonthday=1, interval=1, tz=None)[source]
 
Bases: matplotlib.dates.RRuleLocator Make ticks on occurrences of each month, e.g., 1, 3, 12. Mark every month in bymonth; bymonth can be an int or sequence. Default is range(1, 13), i.e. every month. interval is the interval between each iteration. For example, if interval=2, mark every second occurrence.
matplotlib.dates.num2date(x, tz=None)[source]
 
Convert Matplotlib dates to datetime objects.  Parameters 
 
xfloat or sequence of floats


Number of days (fraction part represents hours, minutes, seconds) since the epoch. See get_epoch for the epoch, which can be changed by rcParams["date.epoch"] (default: '1970-01-01T00:00:00') or set_epoch.  
tzstr, default: rcParams["timezone"] (default: 'UTC')


Timezone of x.    Returns 
 
datetime or sequence of datetime


Dates are returned in timezone tz. If x is a sequence, a sequence of datetime objects will be returned.     Notes The addition of one here is a historical artifact. Also, note that the Gregorian calendar is assumed; this is not universal practice. For details, see the module docstring.
matplotlib.dates.num2epoch(d)[source]
 
[Deprecated] Convert days since Matplotlib epoch to UNIX time.  Parameters 
 
dlist of floats


Time in days since Matplotlib epoch (see get_epoch()).    Returns 
 numpy.array

Time in seconds since 1970-01-01.     Notes  Deprecated since version 3.5.
matplotlib.dates.num2timedelta(x)[source]
 
Convert number of days to a timedelta object. If x is a sequence, a sequence of timedelta objects will be returned.  Parameters 
 
xfloat, sequence of floats


Number of days. The fraction part represents hours, minutes, seconds.    Returns 
 
datetime.timedelta or list[datetime.timedelta]
normalized()
 
Return a version of this object represented entirely using integer values for the relative attributes. >>> relativedelta(days=1.5, hours=2).normalized()
relativedelta(days=+1, hours=+14)
  Returns 
Returns a dateutil.relativedelta.relativedelta object.
replace(**kwargs)
 
Return new rrule with same attributes except for those attributes given new values by whichever keyword arguments are specified.
classmatplotlib.dates.RRuleLocator(o, tz=None)[source]
 
Bases: matplotlib.dates.DateLocator  Parameters 
 
tzdatetime.tzinfo

     staticget_unit_generic(freq)[source]

   tick_values(vmin, vmax)[source]
 
Return the values of the located ticks given vmin and vmax.  Note To get tick locations with the vmin and vmax values defined automatically for the associated axis simply call the Locator instance: >>> print(type(loc))
<type 'Locator'>
>>> print(loc())
[1, 2, 3, 4]
classmatplotlib.dates.SecondLocator(bysecond=None, interval=1, tz=None)[source]
 
Bases: matplotlib.dates.RRuleLocator Make ticks on occurrences of each second. Mark every second in bysecond; bysecond can be an int or sequence. Default is to tick every second: bysecond = range(60) interval is the interval between each iteration. For example, if interval=2, mark every second occurrence.
matplotlib.dates.set_epoch(epoch)[source]
 
Set the epoch (origin for dates) for datetime calculations. The default epoch is rcParams["dates.epoch"] (by default 1970-01-01T00:00). If microsecond accuracy is desired, the date being plotted needs to be within approximately 70 years of the epoch. Matplotlib internally represents dates as days since the epoch, so floating point dynamic range needs to be within a factor of 2^52. set_epoch must be called before any dates are converted (i.e. near the import section) or a RuntimeError will be raised. See also Date Precision and Epochs.  Parameters 
 
epochstr


valid UTC date parsable by numpy.datetime64 (do not include timezone).
classmatplotlib.dates.WeekdayLocator(byweekday=1, interval=1, tz=None)[source]
 
Bases: matplotlib.dates.RRuleLocator Make ticks on occurrences of each weekday. Mark every weekday in byweekday; byweekday can be a number or sequence. Elements of byweekday must be one of MO, TU, WE, TH, FR, SA, SU, the constants from dateutil.rrule, which have been imported into the matplotlib.dates namespace. interval specifies the number of weeks to skip. For example, interval=2 plots every second week.
classmatplotlib.dates.YearLocator(base=1, month=1, day=1, tz=None)[source]
 
Bases: matplotlib.dates.RRuleLocator Make ticks on a given day of each year that is a multiple of base. Examples: # Tick every year on Jan 1st
locator = YearLocator()

# Tick every 5 years on July 4th
locator = YearLocator(5, month=7, day=4)
 Mark years that are multiple of base on a given month and day (default jan 1).
matplotlib.docstring   classmatplotlib.docstring.Substitution(*args, **kwargs)[source]
 
Bases: object A decorator that performs %-substitution on an object's docstring. This decorator should be robust even if obj.__doc__ is None (for example, if -OO was passed to the interpreter). Usage: construct a docstring.Substitution with a sequence or dictionary suitable for performing substitution; then decorate a suitable function with the constructed object, e.g.: sub_author_name = Substitution(author='Jason')

@sub_author_name
def some_function(x):
    "%(author)s wrote this function"

# note that some_function.__doc__ is now "Jason wrote this function"
 One can also use positional arguments: sub_first_last_names = Substitution('Edgar Allen', 'Poe')

@sub_first_last_names
def some_function(x):
    "%s %s wrote the Raven"
   update(*args, **kwargs)[source]
 
Update self.params (which must be a dict) with the supplied args. 
 
   matplotlib.docstring.copy(source)[source]
 
Copy a docstring from another source function (if present).
matplotlib.docstring.copy(source)[source]
 
Copy a docstring from another source function (if present).
classmatplotlib.docstring.Substitution(*args, **kwargs)[source]
 
Bases: object A decorator that performs %-substitution on an object's docstring. This decorator should be robust even if obj.__doc__ is None (for example, if -OO was passed to the interpreter). Usage: construct a docstring.Substitution with a sequence or dictionary suitable for performing substitution; then decorate a suitable function with the constructed object, e.g.: sub_author_name = Substitution(author='Jason')

@sub_author_name
def some_function(x):
    "%(author)s wrote this function"

# note that some_function.__doc__ is now "Jason wrote this function"
 One can also use positional arguments: sub_first_last_names = Substitution('Edgar Allen', 'Poe')

@sub_first_last_names
def some_function(x):
    "%s %s wrote the Raven"
   update(*args, **kwargs)[source]
 
Update self.params (which must be a dict) with the supplied args.
update(*args, **kwargs)[source]
 
Update self.params (which must be a dict) with the supplied args.
classmatplotlib.dviread.Dvi(filename, dpi)[source]
 
Bases: object A reader for a dvi ("device-independent") file, as produced by TeX. The current implementation can only iterate through pages in order, and does not even attempt to verify the postamble. This class can be used as a context manager to close the underlying file upon exit. Pages can be read via iteration. Here is an overly simple way to extract text without trying to detect whitespace: >>> with matplotlib.dviread.Dvi('input.dvi', 72) as dvi:
...     for page in dvi:
...         print(''.join(chr(t.glyph) for t in page.text))
 Read the data from the file named filename and convert TeX's internal units to units of dpi per inch. dpi only sets the units and does not limit the resolution. Use None to return TeX's internal units.   propertybaseline[source]

   close()[source]
 
Close the underlying file if it is open.
classmatplotlib.dviread.DviFont(scale, tfm, texname, vf)[source]
 
Bases: object Encapsulation of a font that a DVI file can refer to. This class holds a font's texname and size, supports comparison, and knows the widths of glyphs in the same units as the AFM file. There are also internal attributes (for use by dviread.py) that are not used for comparison. The size is in Adobe points (converted from TeX points).  Parameters 
 
scalefloat


Factor by which the font is scaled from its natural size.  
tfmTfm


TeX font metrics for this font  
texnamebytes


Name of the font as used internally by TeX and friends, as an ASCII bytestring. This is usually very different from any external font names; PsfontsMap can be used to find the external name of the font.  
vfVf


A TeX "virtual font" file, or None if this font is not virtual.    Attributes 
 
texnamebytes


sizefloat


Size of the font in Adobe points, converted from the slightly smaller TeX points.  
widthslist


Widths of glyphs in glyph-space units, typically 1/1000ths of the point size.       size

   texname

   widths
matplotlib.dviread.find_tex_file(filename, format=<deprecated parameter>)[source]
 
Find a file in the texmf tree. Calls kpsewhich which is an interface to the kpathsea library [1]. Most existing TeX distributions on Unix-like systems use kpathsea. It is also available as part of MikTeX, a popular distribution on Windows. If the file is not found, an empty string is returned.  Parameters 
 
filenamestr or path-like


formatstr or bytes


Used as the value of the --format option to kpsewhich. Could be e.g. 'tfm' or 'vf' to limit the search to that type of files. Deprecated.     References  1 
Kpathsea documentation The library that kpsewhich is part of.
classmatplotlib.dviread.PsFont(texname, psname, effects, encoding, filename)[source]
 
Bases: tuple Create new instance of PsFont(texname, psname, effects, encoding, filename)   effects
 
Alias for field number 2 
   encoding
 
Alias for field number 3 
   filename
 
Alias for field number 4 
   psname
 
Alias for field number 1 
   texname
 
Alias for field number 0
classmatplotlib.dviread.PsfontsMap(filename)[source]
 
Bases: object A psfonts.map formatted file, mapping TeX fonts to PS fonts.  Parameters 
 
filenamestr or path-like

   Notes For historical reasons, TeX knows many Type-1 fonts by different names than the outside world. (For one thing, the names have to fit in eight characters.) Also, TeX's native fonts are not Type-1 but Metafont, which is nontrivial to convert to PostScript except as a bitmap. While high-quality conversions to Type-1 format exist and are shipped with modern TeX distributions, we need to know which Type-1 fonts are the counterparts of which native fonts. For these reasons a mapping is needed from internal font names to font file names. A texmf tree typically includes mapping files called e.g. psfonts.map, pdftex.map, or dvipdfm.map. The file psfonts.map is used by dvips, pdftex.map by pdfTeX, and dvipdfm.map by dvipdfm. psfonts.map might avoid embedding the 35 PostScript fonts (i.e., have no filename for them, as in the Times-Bold example above), while the pdf-related files perhaps only avoid the "Base 14" pdf fonts. But the user may have configured these files differently. Examples >>> map = PsfontsMap(find_tex_file('pdftex.map'))
>>> entry = map[b'ptmbo8r']
>>> entry.texname
b'ptmbo8r'
>>> entry.psname
b'Times-Bold'
>>> entry.encoding
'/usr/local/texlive/2008/texmf-dist/fonts/enc/dvips/base/8r.enc'
>>> entry.effects
{'slant': 0.16700000000000001}
>>> entry.filename
classmatplotlib.dviread.Tfm(filename)[source]
 
Bases: object A TeX Font Metric file. This implementation covers only the bare minimum needed by the Dvi class.  Parameters 
 
filenamestr or path-like

  Attributes 
 
checksumint


Used for verifying against the dvi file.  
design_sizeint


Design size of the font (unknown units)  
width, height, depthdict


Dimensions of each character, need to be scaled by the factor specified in the dvi file. These are dicts because indexing may not start from 0.       checksum

   depth

   design_size

   height

   width
classmatplotlib.dviread.Vf(filename)[source]
 
Bases: matplotlib.dviread.Dvi A virtual font (*.vf file) containing subroutines for dvi files.  Parameters 
 
filenamestr or path-like

   Notes The virtual font format is a derivative of dvi: http://mirrors.ctan.org/info/knuth/virtual-fonts This class reuses some of the machinery of Dvi but replaces the _read loop and dispatch mechanism. Examples vf = Vf(filename)
glyph = vf[code]
glyph.text, glyph.boxes, glyph.width
 Read the data from the file named filename and convert TeX's internal units to units of dpi per inch. dpi only sets the units and does not limit the resolution. Use None to return TeX's internal units.
matplotlib.figure.figaspect(arg)[source]
 
Calculate the width and height for a figure with a specified aspect ratio. While the height is taken from rcParams["figure.figsize"] (default: [6.4, 4.8]), the width is adjusted to match the desired aspect ratio. Additionally, it is ensured that the width is in the range [4., 16.] and the height is in the range [2., 16.]. If necessary, the default height is adjusted to ensure this.  Parameters 
 
argfloat or 2D array


If a float, this defines the aspect ratio (i.e. the ratio height / width). In case of an array the aspect ratio is number of rows / number of columns, so that the array could be fitted in the figure undistorted.    Returns 
 
width, heightfloat


The figure size in inches.     Notes If you want to create an Axes within the figure, that still preserves the aspect ratio, be sure to create it with equal width and height. See examples below. Thanks to Fernando Perez for this function. Examples Make a figure twice as tall as it is wide: w, h = figaspect(2.)
fig = Figure(figsize=(w, h))
ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
ax.imshow(A, **kwargs)
 Make a figure with the proper aspect for an array: A = rand(5, 3)
w, h = figaspect(A)
fig = Figure(figsize=(w, h))
ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
ax.imshow(A, **kwargs)
add_artist(artist, clip=False)[source]
 
Add an Artist to the figure. Usually artists are added to Axes objects using Axes.add_artist; this method can be used in the rare cases where one needs to add artists directly to the figure instead.  Parameters 
 
artistArtist


The artist to add to the figure. If the added artist has no transform previously set, its transform will be set to figure.transSubfigure.  
clipbool, default: False


Whether the added artist should be clipped by the figure patch.    Returns 
 Artist

The added artist.
add_axobserver(func)[source]
 
Whenever the Axes state change, func(self) will be called.
add_gridspec(nrows=1, ncols=1, **kwargs)[source]
 
Return a GridSpec that has this figure as a parent. This allows complex layout of Axes in the figure.  Parameters 
 
nrowsint, default: 1


Number of rows in grid.  
ncolsint, default: 1


Number or columns in grid.    Returns 
 GridSpec
  Other Parameters 
 **kwargs

Keyword arguments are passed to GridSpec.      See also  matplotlib.pyplot.subplots
  Examples Adding a subplot that spans two rows: fig = plt.figure()
gs = fig.add_gridspec(2, 2)
ax1 = fig.add_subplot(gs[0, 0])
ax2 = fig.add_subplot(gs[1, 0])
# spans two rows:
ax3 = fig.add_subplot(gs[:, 1])