Skip to content

Commit 2e65332

Browse files
ZPyrolinktimhoffm
andauthored
[TYP] Add more literals to MarkerType (#30261)
* Update mpl.typing.MarkerType * Revert superfluous changes * Moved import * Remove unnecessary import Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> * Correct integers values on MarkerType --------- Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
1 parent e1c9492 commit 2e65332

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/matplotlib/typing.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,16 @@
7070
)
7171
"""See :doc:`/gallery/lines_bars_and_markers/markevery_demo`."""
7272

73-
MarkerType: TypeAlias = str | path.Path | MarkerStyle
73+
MarkerType: TypeAlias = (
74+
path.Path | MarkerStyle | str | # str required for "$...$" marker
75+
Literal[
76+
".", ",", "o", "v", "^", "<", ">",
77+
"1", "2", "3", "4", "8", "s", "p",
78+
"P", "*", "h", "H", "+", "x", "X",
79+
"D", "d", "|", "_", "none", " ",
80+
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
81+
] | list[tuple[int, int]] | tuple[int, Literal[0, 1, 2], int]
82+
)
7483
"""
7584
Marker specification. See :doc:`/gallery/lines_bars_and_markers/marker_reference`.
7685
"""

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy