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 = ColorType[source]#

Any color specification accepted by Matplotlib. See color.

matplotlib.typing.RGBColorType = RGBColorType[source]#

Any RGB color specification accepted by Matplotlib.

matplotlib.typing.RGBAColorType = RGBAColorType[source]#

Any RGBA color specification accepted by Matplotlib.

matplotlib.typing.ColourType = ColourType[source]#

Alias of ColorType.

matplotlib.typing.RGBColourType = RGBColourType[source]#

Alias of RGBColorType.

matplotlib.typing.RGBAColourType = RGBAColourType[source]#

Alias of RGBAColorType.

Artist styles#

matplotlib.typing.LineStyleType = LineStyleType[source]#

Any line style specification accepted by Matplotlib. See Linestyles.

matplotlib.typing.DrawStyleType = DrawStyleType[source]#

See Step Demo.

matplotlib.typing.MarkEveryType = MarkEveryType[source]#

See Markevery Demo.

matplotlib.typing.MarkerType = MarkerType[source]#

Marker specification. See Marker reference.

matplotlib.typing.FillStyleType = FillStyleType[source]#

Marker fill styles. See Marker reference.

matplotlib.typing.CapStyleType = CapStyleType[source]#

Line cap styles. See CapStyle.

matplotlib.typing.JoinStyleType = JoinStyleType[source]#

Line join styles. See JoinStyle.

Events#

matplotlib.typing.MouseEventType = MouseEventType[source]#

Literal type for valid MouseEvent names.

matplotlib.typing.KeyEventType = KeyEventType[source]#

Literal type for valid KeyEvent names.

matplotlib.typing.DrawEventType = DrawEventType[source]#

Literal type for valid DrawEvent names.

matplotlib.typing.PickEventType = PickEventType[source]#

Literal type for valid PickEvent names.

matplotlib.typing.ResizeEventType = ResizeEventType[source]#

Literal type for valid ResizeEvent names.

matplotlib.typing.CloseEventType = CloseEventType[source]#

Literal type for valid CloseEvent names.

matplotlib.typing.EventType = EventType[source]#

Literal type for all valid events.

rcParams and stylesheets#

matplotlib.typing.RcKeyType = RcKeyType[source]#

Valid specifiers for keys in matplotlib.rcParams and matplotlib.rc_context.

matplotlib.typing.RcGroupKeyType = RcGroupKeyType[source]#

Literal type for valid groups accepted by matplotlib.rc.

matplotlib.typing.RcStyleType = RcStyleType[source]#

Valid specifiers for styles as used in matplotlib.style.use and matplotlib.style.context.

Other types#

matplotlib.typing.CoordsType = CoordsType[source]#

Annotation coordinate systems. See Annotations.

matplotlib.typing.DataParamType = DataParamType[source]#

The type of the data parameter in plotting functions.

matplotlib.typing.LegendLocType = LegendLocType[source]#

Supported location specifiers for legends.

This is a superset of permissible entries. "best" is only applicable to Axes legends. All the "outside ..." locations are only applicable to figure legends.

matplotlib.typing.LogLevel = LogLevel[source]#

Literal type for valid logging levels accepted by matplotlib.set_loglevel().

matplotlib.typing.HashableList = HashableList[source]#

A nested list of Hashable values.