id
int64
0
190k
prompt
stringlengths
21
13.4M
docstring
stringlengths
1
12k
171,010
import ast from functools import lru_cache, reduce from numbers import Number import operator import os import re import numpy as np from matplotlib import _api, cbook from matplotlib.cbook import ls_mapper from matplotlib.colors import Colormap, is_color_like from matplotlib._fontconfig_pattern import parse_fontconfig...
A validator for all possible line styles, the named ones *and* the on-off ink sequences.
171,011
import ast from functools import lru_cache, reduce from numbers import Number import operator import os import re import numpy as np from matplotlib import _api, cbook from matplotlib.cbook import ls_mapper from matplotlib.colors import Colormap, is_color_like from matplotlib._fontconfig_pattern import parse_fontconfig...
Validate the markevery property of a Line2D object. Parameters ---------- s : None, int, (int, int), slice, float, (float, float), or list[int] Returns ------- None, int, (int, int), slice, float, (float, float), or list[int]
171,012
import ast from functools import lru_cache, reduce from numbers import Number import operator import os import re import numpy as np from matplotlib import _api, cbook from matplotlib.cbook import ls_mapper from matplotlib.colors import Colormap, is_color_like from matplotlib._fontconfig_pattern import parse_fontconfig...
null
171,013
import ast from functools import lru_cache, reduce from numbers import Number import operator import os import re import numpy as np from matplotlib import _api, cbook from matplotlib.cbook import ls_mapper from matplotlib.colors import Colormap, is_color_like from matplotlib._fontconfig_pattern import parse_fontconfig...
null
171,014
import ast from functools import lru_cache, reduce from numbers import Number import operator import os import re import numpy as np from matplotlib import _api, cbook from matplotlib.cbook import ls_mapper from matplotlib.colors import Colormap, is_color_like from matplotlib._fontconfig_pattern import parse_fontconfig...
null
171,015
import ast from functools import lru_cache, reduce from numbers import Number import operator import os import re import numpy as np from matplotlib import _api, cbook from matplotlib.cbook import ls_mapper from matplotlib.colors import Colormap, is_color_like from matplotlib._fontconfig_pattern import parse_fontconfig...
null
171,016
import ast from functools import lru_cache, reduce from numbers import Number import operator import os import re import numpy as np from matplotlib import _api, cbook from matplotlib.cbook import ls_mapper from matplotlib.colors import Colormap, is_color_like from matplotlib._fontconfig_pattern import parse_fontconfig...
r""" Validate a hatch pattern. A hatch pattern string can have any sequence of the following characters: ``\ / | - + * . x o O``.
171,017
import ast from functools import lru_cache, reduce from numbers import Number import operator import os import re import numpy as np from matplotlib import _api, cbook from matplotlib.cbook import ls_mapper from matplotlib.colors import Colormap, is_color_like from matplotlib._fontconfig_pattern import parse_fontconfig...
null
171,018
import ast from functools import lru_cache, reduce from numbers import Number import operator import os import re import numpy as np from matplotlib import _api, cbook from matplotlib.cbook import ls_mapper from matplotlib.colors import Colormap, is_color_like from matplotlib._fontconfig_pattern import parse_fontconfig...
null
171,019
from base64 import b64encode import copy import dataclasses from functools import lru_cache from io import BytesIO import json import logging from numbers import Number import os from pathlib import Path import re import subprocess import sys import threading import matplotlib as mpl from matplotlib import _api, _afm, ...
Search for fonts in the specified font paths. If no paths are given, will use a standard set of system paths, as well as the list of fonts tracked by fontconfig if fontconfig is installed and available. A list of TrueType fonts are returned by default with AFM fonts as an option.
171,020
from base64 import b64encode import copy import dataclasses from functools import lru_cache from io import BytesIO import json import logging from numbers import Number import os from pathlib import Path import re import subprocess import sys import threading import matplotlib as mpl from matplotlib import _api, _afm, ...
null
171,021
from base64 import b64encode import copy import dataclasses from functools import lru_cache from io import BytesIO import json import logging from numbers import Number import os from pathlib import Path import re import subprocess import sys import threading import matplotlib as mpl from matplotlib import _api, _afm, ...
Extract information from a TrueType font file. Parameters ---------- font : `.FT2Font` The TrueType font file from which information will be extracted. Returns ------- `FontEntry` The extracted font properties.
171,022
from base64 import b64encode import copy import dataclasses from functools import lru_cache from io import BytesIO import json import logging from numbers import Number import os from pathlib import Path import re import subprocess import sys import threading import matplotlib as mpl from matplotlib import _api, _afm, ...
Extract information from an AFM font file. Parameters ---------- font : AFM The AFM font file from which information will be extracted. Returns ------- `FontEntry` The extracted font properties.
171,023
from base64 import b64encode import copy import dataclasses from functools import lru_cache from io import BytesIO import json import logging from numbers import Number import os from pathlib import Path import re import subprocess import sys import threading import matplotlib as mpl from matplotlib import _api, _afm, ...
Return whether the given font is a Postscript Compact Font Format Font embedded in an OpenType wrapper. Used by the PostScript and PDF backends that can not subset these fonts.
171,024
from base64 import b64encode import copy import dataclasses from functools import lru_cache from io import BytesIO import json import logging from numbers import Number import os from pathlib import Path import re import subprocess import sys import threading import matplotlib as mpl from matplotlib import _api, _afm, ...
null
171,025
import datetime import functools import logging from numbers import Number import numpy as np import matplotlib as mpl from matplotlib import _api, cbook import matplotlib.artist as martist import matplotlib.colors as mcolors import matplotlib.lines as mlines import matplotlib.scale as mscale import matplotlib.text as ...
Helper to generate ``get_{data,view}_interval`` and ``set_{data,view}_interval`` implementations.
171,026
from . import _api, _docstring from .artist import Artist, allow_rasterization from .patches import Rectangle from .text import Text from .transforms import Bbox from .path import Path class Table(Artist): """ A table of cells. The table consists of a grid of cells, which are indexed by (row, column). F...
Add a table to an `~.axes.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 he...
171,027
import functools import inspect import math from numbers import Number import textwrap from types import SimpleNamespace from collections import namedtuple from matplotlib.transforms import Affine2D import numpy as np import matplotlib as mpl from . import (_api, artist, cbook, colors, _docstring, hatch as mhatch, ...
A debug function to draw a rectangle around the bounding box returned by an artist's `.Artist.get_window_extent` to test whether the artist is returning the correct bbox. *props* is a dict of rectangle props with the additional property 'pad' that sets the padding around the bbox in points.
171,028
import functools import inspect import math from numbers import Number import textwrap from types import SimpleNamespace from collections import namedtuple from matplotlib.transforms import Affine2D import numpy as np import matplotlib as mpl from . import (_api, artist, cbook, colors, _docstring, hatch as mhatch, ...
A debug function to draw a rectangle around the bounding box returned by an artist's `.Artist.get_window_extent` to test whether the artist is returning the correct bbox.
171,029
import functools import inspect import math from numbers import Number import textwrap from types import SimpleNamespace from collections import namedtuple from matplotlib.transforms import Affine2D import numpy as np import matplotlib as mpl from . import (_api, artist, cbook, colors, _docstring, hatch as mhatch, ...
Class decorator that stashes a class in a (style) dictionary.
171,030
import functools import inspect import math from numbers import Number import textwrap from types import SimpleNamespace from collections import namedtuple from matplotlib.transforms import Affine2D import numpy as np import matplotlib as mpl from . import (_api, artist, cbook, colors, _docstring, hatch as mhatch, ...
Return the point on the line connecting (*x0*, *y0*) -- (*x1*, *y1*) whose distance from (*x0*, *y0*) is *d*.
171,031
import copy from functools import lru_cache from weakref import WeakValueDictionary import numpy as np import matplotlib as mpl from . import _api, _path from .cbook import _to_unmasked_float_array, simple_linear_interpolation from .bezier import BezierSegment class Bbox(BboxBase): """ A mutable bounding box. ...
r""" Given a sequence of `Path`\s, `.Transform`\s objects, and offsets, as found in a `.PathCollection`, returns the bounding box that encapsulates all of them. Parameters ---------- master_transform : `.Transform` Global transformation applied to all paths. paths : list of `Path` transforms : list of `.Affine2D` offse...
171,032
import math import os import logging from pathlib import Path import warnings import numpy as np import PIL.PngImagePlugin import matplotlib as mpl from matplotlib import _api, cbook, cm from matplotlib import _image from matplotlib._image import * import matplotlib.artist as martist from matplotlib.backend_bases impor...
Draw a sorted list of artists, compositing images into a single image where possible. For internal Matplotlib use only: It is here to reduce duplication between `Figure.draw` and `Axes.draw`, but otherwise should not be generally useful.
171,033
import math import os import logging from pathlib import Path import warnings import numpy as np import PIL.PngImagePlugin import matplotlib as mpl from matplotlib import _api, cbook, cm from matplotlib import _image from matplotlib._image import * import matplotlib.artist as martist from matplotlib.backend_bases impor...
Convenience wrapper around `._image.resample` to resample *data* to *out_shape* (with a third dimension if *data* is RGBA) that takes care of allocating the output array and fetching the relevant properties from the Image object *image_obj*.
171,034
import math import os import logging from pathlib import Path import warnings import numpy as np import PIL.PngImagePlugin import matplotlib as mpl from matplotlib import _api, cbook, cm from matplotlib import _image from matplotlib._image import * import matplotlib.artist as martist from matplotlib.backend_bases impor...
Convert an RGB image to RGBA, as required by the image resample C++ extension.
171,035
import math import os import logging from pathlib import Path import warnings import numpy as np import PIL.PngImagePlugin import matplotlib as mpl from matplotlib import _api, cbook, cm from matplotlib import _image from matplotlib._image import * import matplotlib.artist as martist from matplotlib.backend_bases impor...
Colormap and save an array as an image file. RGB(A) images are passed through. Single channel images will be colormapped according to *cmap* and *norm*. .. note:: If you want to save a single channel image as gray scale please use an image I/O library (such as pillow, tifffile, or imageio) directly. Parameters --------...
171,036
import math import os import logging from pathlib import Path import warnings import numpy as np import PIL.PngImagePlugin import matplotlib as mpl from matplotlib import _api, cbook, cm from matplotlib import _image from matplotlib._image import * import matplotlib.artist as martist from matplotlib.backend_bases impor...
Make a thumbnail of image in *infile* with output filename *thumbfile*. See :doc:`/gallery/misc/image_thumbnail_sgskip`. Parameters ---------- infile : str or file-like The image file. Matplotlib relies on Pillow_ for image reading, and thus supports a wide range of file formats, including PNG, JPG, TIFF and others. .....
171,037
import itertools import logging import locale import math from numbers import Integral import numpy as np import matplotlib as mpl from matplotlib import _api, cbook from matplotlib import transforms as mtransforms def scale_range(vmin, vmax, n=1, threshold=100): dv = abs(vmax - vmin) # > 0 as nonsingular is call...
null
171,038
import itertools import logging import locale import math from numbers import Integral import numpy as np import matplotlib as mpl from matplotlib import _api, cbook from matplotlib import transforms as mtransforms def is_close_to_int(x, *, atol=1e-10): return abs(x - np.round(x)) < atol def is_decade(x, base=10, ...
null
171,039
import itertools import logging import locale import math from numbers import Integral import numpy as np import matplotlib as mpl from matplotlib import _api, cbook from matplotlib import transforms as mtransforms The provided code snippet includes necessary dependencies for implementing the `_is_decade` function. Wr...
Return True if *x* is an integer power of *base*.
171,040
import itertools import logging import locale import math from numbers import Integral import numpy as np import matplotlib as mpl from matplotlib import _api, cbook from matplotlib import transforms as mtransforms def _is_close_to_int(x): return math.isclose(x, round(x))
null
171,041
from itertools import cycle import numpy as np from matplotlib import _api, cbook from matplotlib.lines import Line2D from matplotlib.patches import Rectangle import matplotlib.collections as mcoll def update_from_first_child(tgt, src): first_child = next(iter(src.get_children()), None) if first_child is not N...
null
171,042
from collections.abc import Mapping import functools import numpy as np from numpy import ma import matplotlib as mpl from matplotlib import _api, colors, cbook, scale from matplotlib._cm import datad from matplotlib._cm_listed import cmaps as cmaps_listed _LUTSIZE = mpl.rcParams['image.lut'] datad = { 'Blues': _B...
Generate a dict mapping standard colormap names to standard colormaps, as well as the reversed colormaps.
171,043
from collections.abc import Mapping import functools import numpy as np from numpy import ma import matplotlib as mpl from matplotlib import _api, colors, cbook, scale from matplotlib._cm import datad from matplotlib._cm_listed import cmaps as cmaps_listed _colormaps = ColormapRegistry(_gen_cmap_registry()) The provid...
Add a colormap to the set recognized by :func:`get_cmap`. Register a new colormap to be accessed by name :: LinearSegmentedColormap('swirly', data, lut) register_cmap(cmap=swirly_cmap) Parameters ---------- name : str, optional The name that can be used in :func:`get_cmap` or :rc:`image.cmap` If absent, the name will b...
171,044
from collections.abc import Mapping import functools import numpy as np from numpy import ma import matplotlib as mpl from matplotlib import _api, colors, cbook, scale from matplotlib._cm import datad from matplotlib._cm_listed import cmaps as cmaps_listed _colormaps = ColormapRegistry(_gen_cmap_registry()) The provid...
Remove a colormap recognized by :func:`get_cmap`. You may not remove built-in colormaps. If the named colormap is not registered, returns with no error, raises if you try to de-register a default colormap. .. warning:: Colormap names are currently a shared namespace that may be used by multiple packages. Use `unregiste...
171,045
from collections.abc import Mapping import functools import numpy as np from numpy import ma import matplotlib as mpl from matplotlib import _api, colors, cbook, scale from matplotlib._cm import datad from matplotlib._cm_listed import cmaps as cmaps_listed The provided code snippet includes necessary dependencies for ...
Automatically generate a norm class from *scale_cls*. This differs from `.colors.make_norm_from_scale` in the following points: - This function is not a class decorator, but directly returns a norm class (as if decorating `.Normalize`). - The scale is automatically constructed with ``nonpositive="mask"``, if it support...
171,046
from functools import lru_cache, partial import re from pyparsing import ( Group, Optional, ParseException, Regex, StringEnd, Suppress, ZeroOrMore) from matplotlib import _api _family_escape = partial(re.compile(r'(?=[%s])' % _family_punc).sub, r'\\') _value_escape = partial(re.compile(r'(?=[%s])' % _value_punc).su...
Convert a `.FontProperties` to a fontconfig pattern string.
171,047
import itertools import numpy as np from matplotlib import _api The provided code snippet includes necessary dependencies for implementing the `stackplot` function. Write a Python function `def stackplot(axes, x, *args, labels=(), colors=None, baseline='zero', **kwargs)` to solve the follow...
Draw a stacked area plot. Parameters ---------- x : (N,) array-like y : (M, N) array-like The data is assumed to be unstacked. Each of the following calls is legal:: stackplot(x, y) # where y has shape (M, N) stackplot(x, y1, y2, y3) # where y1, y2, y3, y4 have length N baseline : {'zero', 'sym', 'wiggle', 'weighted_wi...
171,048
from contextlib import ExitStack import copy import itertools from numbers import Integral, Number from cycler import cycler import numpy as np import matplotlib as mpl from . import (_api, _docstring, backend_tools, cbook, collections, colors, text as mtext, ticker, transforms) from .lines import Line2D...
null
171,049
import numpy as np import matplotlib as mpl from matplotlib import _api, cm, patches import matplotlib.colors as mcolors import matplotlib.collections as mcollections import matplotlib.lines as mlines class StreamplotSet: def __init__(self, lines, arrows): self.lines = lines self.arrows = arrows cla...
Draw streamlines of a vector flow. Parameters ---------- x, y : 1D/2D arrays Evenly spaced strictly increasing arrays to make a grid. If 2D, all rows of *x* must be equal and all columns of *y* must be equal; i.e., they must be as if generated by ``np.meshgrid(x_1d, y_1d)``. u, v : 2D arrays *x* and *y*-velocities. The...
171,050
import functools import logging import math from numbers import Real import weakref import numpy as np import matplotlib as mpl from . import _api, artist, cbook, _docstring from .artist import Artist from .font_manager import FontProperties from .patches import FancyArrowPatch, FancyBboxPatch, Rectangle from .textpath...
Calculate the bounding box of the text. The bbox position takes text rotation into account, but the width and height are those of the unrotated box (unlike `.Text.get_window_extent`).
171,051
import functools import logging import math from numbers import Real import weakref import numpy as np import matplotlib as mpl from . import _api, artist, cbook, _docstring from .artist import Artist from .font_manager import FontProperties from .patches import FancyArrowPatch, FancyBboxPatch, Rectangle from .textpath...
Call ``renderer.get_text_width_height_descent``, caching the results.
171,052
import contextlib import logging import os from pathlib import Path import sys import warnings import matplotlib as mpl from matplotlib import _api, _docstring, _rc_params_in_file, rcParamsDefault def use(style): """ Use Matplotlib style settings from a style specification. The style name of 'default' is re...
Context manager for using style settings temporarily. Parameters ---------- style : str, dict, Path or list A style specification. Valid options are: str - One of the style names in `.style.available` (a builtin style or a style installed in the user library path). - A dotted name of the form "package.style_name"; in t...
171,053
import contextlib import logging import os from pathlib import Path import sys import warnings import matplotlib as mpl from matplotlib import _api, _docstring, _rc_params_in_file, rcParamsDefault def update_user_library(library): """Update style library with user-defined rc files.""" for stylelib_path in map(o...
Reload the style library.
171,054
from matplotlib.backend_bases import RendererBase from matplotlib import colors as mcolors from matplotlib import patches as mpatches from matplotlib import transforms as mtransforms from matplotlib.path import Path import numpy as np The provided code snippet includes necessary dependencies for implementing the `_sub...
Create a PathEffect class combining *effect_class* and a normal draw.
171,055
from functools import partial import numpy as np def _flag_red(x): return 0.75 * np.sin((x * 31.5 + 0.25) * np.pi) + 0.5
null
171,056
from functools import partial import numpy as np def _flag_green(x): return np.sin(x * 31.5 * np.pi)
null
171,057
from functools import partial import numpy as np def _flag_blue(x): return 0.75 * np.sin((x * 31.5 - 0.25) * np.pi) + 0.5
null
171,058
from functools import partial import numpy as np def _prism_red(x): return 0.75 * np.sin((x * 20.9 + 0.25) * np.pi) + 0.67
null
171,059
from functools import partial import numpy as np def _prism_green(x): return 0.75 * np.sin((x * 20.9 - 0.25) * np.pi) + 0.33
null
171,060
from functools import partial import numpy as np def _prism_blue(x): return -1.1 * np.sin((x * 20.9) * np.pi)
null
171,061
from functools import partial import numpy as np def _ch_helper(gamma, s, r, h, p0, p1, x): """Helper function for generating picklable cubehelix colormaps.""" # Apply gamma factor to emphasise low or high intensity values xg = x ** gamma # Calculate amplitude and angle of deviation from the black to wh...
Return custom data dictionary of (r, g, b) conversion functions, which can be used with :func:`register_cmap`, for the cubehelix color scheme. Unlike most other color schemes cubehelix was designed by D.A. Green to be monotonically increasing in terms of perceived brightness. Also, when printed on a black and white pos...
171,062
from functools import partial import numpy as np def _g0(x): return 0
null
171,063
from functools import partial import numpy as np def _g1(x): return 0.5
null
171,064
from functools import partial import numpy as np def _g2(x): return 1
null
171,065
from functools import partial import numpy as np def _g3(x): return x
null
171,066
from functools import partial import numpy as np def _g4(x): return x ** 2
null
171,067
from functools import partial import numpy as np def _g5(x): return x ** 3
null
171,068
from functools import partial import numpy as np def _g6(x): return x ** 4
null
171,069
from functools import partial import numpy as np def _g7(x): return np.sqrt(x)
null
171,070
from functools import partial import numpy as np def _g8(x): return np.sqrt(np.sqrt(x))
null
171,071
from functools import partial import numpy as np def _g9(x): return np.sin(x * np.pi / 2)
null
171,072
from functools import partial import numpy as np def _g10(x): return np.cos(x * np.pi / 2)
null
171,073
from functools import partial import numpy as np def _g11(x): return np.abs(x - 0.5)
null
171,074
from functools import partial import numpy as np def _g12(x): return (2 * x - 1) ** 2
null
171,075
from functools import partial import numpy as np def _g13(x): return np.sin(x * np.pi)
null
171,076
from functools import partial import numpy as np def _g14(x): return np.abs(np.cos(x * np.pi))
null
171,077
from functools import partial import numpy as np def _g15(x): return np.sin(x * 2 * np.pi)
null
171,078
from functools import partial import numpy as np def _g16(x): return np.cos(x * 2 * np.pi)
null
171,079
from functools import partial import numpy as np def _g17(x): return np.abs(np.sin(x * 2 * np.pi))
null
171,080
from functools import partial import numpy as np def _g18(x): return np.abs(np.cos(x * 2 * np.pi))
null
171,081
from functools import partial import numpy as np def _g19(x): return np.abs(np.sin(x * 4 * np.pi))
null
171,082
from functools import partial import numpy as np def _g20(x): return np.abs(np.cos(x * 4 * np.pi))
null
171,083
from functools import partial import numpy as np def _g21(x): return 3 * x
null
171,084
from functools import partial import numpy as np def _g22(x): return 3 * x - 1
null
171,085
from functools import partial import numpy as np def _g23(x): return 3 * x - 2
null
171,086
from functools import partial import numpy as np def _g24(x): return np.abs(3 * x - 1)
null
171,087
from functools import partial import numpy as np def _g25(x): return np.abs(3 * x - 2)
null
171,088
from functools import partial import numpy as np def _g26(x): return (3 * x - 1) / 2
null
171,089
from functools import partial import numpy as np def _g27(x): return (3 * x - 2) / 2
null
171,090
from functools import partial import numpy as np def _g28(x): return np.abs((3 * x - 1) / 2)
null
171,091
from functools import partial import numpy as np def _g29(x): return np.abs((3 * x - 2) / 2)
null
171,092
from functools import partial import numpy as np def _g30(x): return x / 0.32 - 0.78125
null
171,093
from functools import partial import numpy as np def _g31(x): return 2 * x - 0.84
null
171,094
from functools import partial import numpy as np def _g32(x): ret = np.zeros(len(x)) m = (x < 0.25) ret[m] = 4 * x[m] m = (x >= 0.25) & (x < 0.92) ret[m] = -2 * x[m] + 1.84 m = (x >= 0.92) ret[m] = x[m] / 0.08 - 11.5 return ret
null
171,095
from functools import partial import numpy as np def _g33(x): return np.abs(2 * x - 0.5)
null
171,096
from functools import partial import numpy as np def _g34(x): return 2 * x
null
171,097
from functools import partial import numpy as np def _g35(x): return 2 * x - 0.5
null
171,098
from functools import partial import numpy as np def _g36(x): return 2 * x - 1
null
171,099
from functools import partial import numpy as np def _gist_heat_red(x): return 1.5 * x
null
171,100
from functools import partial import numpy as np def _gist_heat_green(x): return 2 * x - 1
null
171,101
from functools import partial import numpy as np def _gist_heat_blue(x): return 4 * x - 3
null
171,102
from functools import partial import numpy as np def _gist_yarg(x): return 1 - x
null
171,103
import math import numpy as np from numpy import ma from matplotlib import _api, cbook, _docstring import matplotlib.artist as martist import matplotlib.collections as mcollections from matplotlib.patches import CirclePolygon import matplotlib.text as mtext import matplotlib.transforms as transforms The provided code ...
Helper function to parse positional parameters for colored vector plots. This is currently used for Quiver and Barbs. Parameters ---------- *args : list list of 2-5 arguments. Depending on their number they are parsed to:: U, V U, V, C X, Y, U, V X, Y, U, V, C caller_name : str Name of the calling method (used in error...
171,104
import math import numpy as np from numpy import ma from matplotlib import _api, cbook, _docstring import matplotlib.artist as martist import matplotlib.collections as mcollections from matplotlib.patches import CirclePolygon import matplotlib.text as mtext import matplotlib.transforms as transforms def _check_consist...
null
171,105
from collections.abc import Iterable, Sequence from contextlib import ExitStack import functools import inspect import itertools import logging from numbers import Real from operator import attrgetter import types import numpy as np import matplotlib as mpl from matplotlib import _api, cbook, _docstring, offsetbox impo...
Convert a MATLAB style color/line style format string to a (*linestyle*, *marker*, *color*) tuple. Example format strings include: * 'ko': black circles * '.b': blue dots * 'r--': red dashed lines * 'C2--': the third color in the color cycle, dashed lines The format is absolute in the sense that if a linestyle or marke...
171,106
from collections.abc import Iterable, Sequence from contextlib import ExitStack import functools import inspect import itertools import logging from numbers import Real from operator import attrgetter import types import numpy as np import matplotlib as mpl from matplotlib import _api, cbook, _docstring, offsetbox impo...
A helper function for rasterizing the list of artists. The bookkeeping to track if we are or are not in rasterizing mode with the mixed-mode backends is relatively complicated and is now handled in the matplotlib.artist.allow_rasterization decorator. This helper defines the absolute minimum methods and attributes on a ...
171,107
import logging import numpy as np import matplotlib as mpl from matplotlib import _api, cbook, collections, cm, colors, contour, ticker import matplotlib.artist as martist import matplotlib.patches as mpatches import matplotlib.path as mpath import matplotlib.spines as mspines import matplotlib.transforms as mtransform...
null
171,108
import logging import numpy as np import matplotlib as mpl from matplotlib import _api, cbook, collections, cm, colors, contour, ticker import matplotlib.artist as martist import matplotlib.patches as mpatches import matplotlib.path as mpath import matplotlib.spines as mspines import matplotlib.transforms as mtransform...
Create an `~.axes.Axes` suitable for a colorbar. The axes is placed in the figure of the *parents* axes, by resizing and repositioning *parents*. Parameters ---------- parents : `~.axes.Axes` or iterable or `numpy.ndarray` of `~.axes.Axes` The Axes to use as parents for placing the colorbar. %(_make_axes_kw_doc)s Retur...
171,109
import logging import numpy as np import matplotlib as mpl from matplotlib import _api, cbook, collections, cm, colors, contour, ticker import matplotlib.artist as martist import matplotlib.patches as mpatches import matplotlib.path as mpath import matplotlib.spines as mspines import matplotlib.transforms as mtransform...
Create an `~.axes.Axes` suitable for a colorbar. The axes is placed in the figure of the *parent* axes, by resizing and repositioning *parent*. This function is similar to `.make_axes` and mostly compatible with it. Primary differences are - `.make_axes_gridspec` requires the *parent* to have a subplotspec. - `.make_ax...