|
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 |
37 | 41 | RGBAColourType: TypeAlias = RGBAColorType |
|
42 | 46 | "", "none", " ", "None"] | |
43 | 47 | tuple[float, Sequence[float]] |
44 | 48 | ) |
| 49 | +""" |
| 50 | +Any line style specification accepted by Matplotlib. |
| 51 | +See :doc:`/gallery/lines_bars_and_markers/linestyles`. |
| 52 | +""" |
| 53 | + |
45 | 54 | DrawStyleType: TypeAlias = Literal["default", "steps", "steps-pre", "steps-mid", |
46 | 55 | "steps-post"] |
| 56 | +"""See :doc:`/gallery/lines_bars_and_markers/step_demo`.""" |
| 57 | + |
47 | 58 | MarkEveryType: TypeAlias = ( |
48 | 59 | None | |
49 | 60 | int | tuple[int, int] | slice | list[int] | |
50 | 61 | float | tuple[float, float] | |
51 | 62 | list[bool] |
52 | 63 | ) |
| 64 | +"""See :doc:`/gallery/lines_bars_and_markers/markevery_demo`.""" |
53 | 65 |
|
54 | 66 | MarkerType: TypeAlias = str | path.Path | MarkerStyle |
| 67 | +""" |
| 68 | +Marker specification. See :doc:`/gallery/lines_bars_and_markers/marker_reference`. |
| 69 | +""" |
| 70 | + |
55 | 71 | FillStyleType: TypeAlias = Literal["full", "left", "right", "bottom", "top", "none"] |
| 72 | +"""Marker fill styles. See :doc:`/gallery/lines_bars_and_markers/marker_reference`.""" |
| 73 | + |
56 | 74 | JoinStyleType: TypeAlias = JoinStyle | Literal["miter", "round", "bevel"] |
| 75 | +"""Line join styles. See :doc:`/gallery/lines_bars_and_markers/joinstyle`.""" |
| 76 | + |
57 | 77 | CapStyleType: TypeAlias = CapStyle | Literal["butt", "projecting", "round"] |
| 78 | +"""Line cap styles. See :doc:`/gallery/lines_bars_and_markers/capstyle`.""" |
58 | 79 |
|
59 | 80 | CoordsBaseType = Union[ |
60 | 81 | str, |
|
0 commit comments