matplotlib.typing
#
Typing support for Matplotlib
This module contains Type aliases which are useful for Matplotlib and potentially downstream libraries.
Warning
Provisional status of typing
The typing
module and type stub files are considered provisional and may change
at any time without a deprecation period.
Color#
- matplotlib.typing.ColorType = tuple[float, float, float] | str | tuple[float, float, float, float] | tuple[tuple[float, float, float] | str, float] | tuple[tuple[float, float, float, float], float]#
Any color specification accepted by Matplotlib. See color.
- matplotlib.typing.RGBColorType = tuple[float, float, float] | str#
Any RGB color specification accepted by Matplotlib.
- matplotlib.typing.RGBAColorType = str | tuple[float, float, float, float] | tuple[tuple[float, float, float] | str, float] | tuple[tuple[float, float, float, float], float]#
Any RGBA color specification accepted by Matplotlib.
- matplotlib.typing.ColourType = tuple[float, float, float] | str | tuple[float, float, float, float] | tuple[tuple[float, float, float] | str, float] | tuple[tuple[float, float, float, float], float]#
Alias of
ColorType
.
- matplotlib.typing.RGBColourType = tuple[float, float, float] | str#
Alias of
RGBColorType
.
- matplotlib.typing.RGBAColourType = str | tuple[float, float, float, float] | tuple[tuple[float, float, float] | str, float] | tuple[tuple[float, float, float, float], float]#
Alias of
RGBAColorType
.
Styles#
- matplotlib.typing.LineStyleType#
Any line style specification accepted by Matplotlib. See Linestyles.
alias of
Literal
['-', 'solid', '--', 'dashed', '-.', 'dashdot', ':', 'dotted', '', 'none', ' ', 'None'] |tuple
[float
,Sequence
[float
]]
- matplotlib.typing.DrawStyleType#
See Step Demo.
alias of
Literal
['default', 'steps', 'steps-pre', 'steps-mid', 'steps-post']
- matplotlib.typing.MarkEveryType = None | int | tuple[int, int] | slice | list[int] | float | tuple[float, float] | list[bool]#
See Markevery Demo.
- matplotlib.typing.FillStyleType#
Marker fill styles. See Marker reference.
alias of
Literal
['full', 'left', 'right', 'bottom', 'top', 'none']
Other types#
- matplotlib.typing.CoordsType#
alias of
str
|Artist
|Transform
|Callable
[[RendererBase
],Bbox
|Transform
] |tuple
[str
|Artist
|Transform
|Callable
[[RendererBase
],Bbox
|Transform
],str
|Artist
|Transform
|Callable
[[RendererBase
],Bbox
|Transform
]]
- matplotlib.typing.RcStyleType = str | dict[str, typing.Any] | pathlib.Path | collections.abc.Sequence[str | pathlib.Path | dict[str, typing.Any]]#
Represent a PEP 604 union type
E.g. for int | str