|
4 | 4 | This module contains Type aliases which are useful for Matplotlib and potentially
|
5 | 5 | downstream libraries.
|
6 | 6 |
|
7 |
| -.. admonition:: Provisional status of typing |
| 7 | +.. warning:: Provisional status of typing |
8 | 8 |
|
9 | 9 | The ``typing`` module and type stub files are considered provisional and may change
|
10 | 10 | at any time without a deprecation period.
|
|
21 | 21 | from .transforms import Bbox, Transform
|
22 | 22 |
|
23 | 23 | RGBColorType: TypeAlias = tuple[float, float, float] | str
|
| 24 | +"""Any RGB color specification accepted by Matplotlib.""" |
| 25 | + |
24 | 26 | RGBAColorType: TypeAlias = (
|
25 | 27 | str | # "none" or "#RRGGBBAA"/"#RGBA" hex strings
|
26 | 28 | tuple[float, float, float, float] |
|
|
30 | 32 | # (4-tuple, float) is odd, but accepted as the outer float overriding A of 4-tuple
|
31 | 33 | tuple[tuple[float, float, float, float], float]
|
32 | 34 | )
|
| 35 | +"""Any RGBA color specification accepted by Matplotlib.""" |
33 | 36 |
|
34 | 37 | ColorType: TypeAlias = RGBColorType | RGBAColorType
|
| 38 | +"""Any color specification accepted by Matplotlib. See :mpltype:`color`.""" |
35 | 39 |
|
36 | 40 | RGBColourType: TypeAlias = RGBColorType
|
| 41 | +"""Alias of `.RGBColorType`.""" |
| 42 | + |
37 | 43 | RGBAColourType: TypeAlias = RGBAColorType
|
| 44 | +"""Alias of `.RGBAColorType`.""" |
| 45 | + |
38 | 46 | ColourType: TypeAlias = ColorType
|
| 47 | +"""Alias of `.ColorType`.""" |
39 | 48 |
|
40 | 49 | LineStyleType: TypeAlias = (
|
41 | 50 | Literal["-", "solid", "--", "dashed", "-.", "dashdot", ":", "dotted",
|
42 | 51 | "", "none", " ", "None"] |
|
43 | 52 | tuple[float, Sequence[float]]
|
44 | 53 | )
|
| 54 | +""" |
| 55 | +Any line style specification accepted by Matplotlib. |
| 56 | +See :doc:`/gallery/lines_bars_and_markers/linestyles`. |
| 57 | +""" |
| 58 | + |
45 | 59 | DrawStyleType: TypeAlias = Literal["default", "steps", "steps-pre", "steps-mid",
|
46 | 60 | "steps-post"]
|
| 61 | +"""See :doc:`/gallery/lines_bars_and_markers/step_demo`.""" |
| 62 | + |
47 | 63 | MarkEveryType: TypeAlias = (
|
48 | 64 | None |
|
49 | 65 | int | tuple[int, int] | slice | list[int] |
|
50 | 66 | float | tuple[float, float] |
|
51 | 67 | list[bool]
|
52 | 68 | )
|
| 69 | +"""See :doc:`/gallery/lines_bars_and_markers/markevery_demo`.""" |
53 | 70 |
|
54 | 71 | MarkerType: TypeAlias = str | path.Path | MarkerStyle
|
| 72 | +""" |
| 73 | +Marker specification. See :doc:`/gallery/lines_bars_and_markers/marker_reference`. |
| 74 | +""" |
| 75 | + |
55 | 76 | FillStyleType: TypeAlias = Literal["full", "left", "right", "bottom", "top", "none"]
|
| 77 | +"""Marker fill styles. See :doc:`/gallery/lines_bars_and_markers/marker_reference`.""" |
| 78 | + |
56 | 79 | JoinStyleType: TypeAlias = JoinStyle | Literal["miter", "round", "bevel"]
|
| 80 | +"""Line join styles. See :doc:`/gallery/lines_bars_and_markers/joinstyle`.""" |
| 81 | + |
57 | 82 | CapStyleType: TypeAlias = CapStyle | Literal["butt", "projecting", "round"]
|
| 83 | +"""Line cap styles. See :doc:`/gallery/lines_bars_and_markers/capstyle`.""" |
58 | 84 |
|
59 | 85 | CoordsBaseType = Union[
|
60 | 86 | str,
|
|
0 commit comments