From ae83d5c67e619c05a47d00162f18752695e530c7 Mon Sep 17 00:00:00 2001 From: ZPyrolink <38cz74@gmail.com> Date: Fri, 4 Jul 2025 21:28:53 +0200 Subject: [PATCH 1/5] Update mpl.typing.MarkerType --- lib/matplotlib/typing.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/matplotlib/typing.py b/lib/matplotlib/typing.py index df192df76b33..2695882d31ab 100644 --- a/lib/matplotlib/typing.py +++ b/lib/matplotlib/typing.py @@ -1,3 +1,5 @@ +from builtins import list + """ Typing support for Matplotlib @@ -49,7 +51,7 @@ LineStyleType: TypeAlias = ( Literal["-", "solid", "--", "dashed", "-.", "dashdot", ":", "dotted", - "", "none", " ", "None"] | + "", "none", " ", "None"] | tuple[float, Sequence[float]] ) """ @@ -58,7 +60,7 @@ """ DrawStyleType: TypeAlias = Literal["default", "steps", "steps-pre", "steps-mid", - "steps-post"] +"steps-post"] """See :doc:`/gallery/lines_bars_and_markers/step_demo`.""" MarkEveryType: TypeAlias = ( @@ -69,7 +71,16 @@ ) """See :doc:`/gallery/lines_bars_and_markers/markevery_demo`.""" -MarkerType: TypeAlias = str | path.Path | MarkerStyle +MarkerType: TypeAlias = ( + path.Path | MarkerStyle | str | # str required for "$...$" marker + Literal[ + ".", ",", "o", "v", "^", "<", ">", + "1", "2", "3", "4", "8", "s", "p", + "P", "*", "h", "H", "+", "x", "X", + "D", "d", "|", "_", "none", " ", + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 + ] | list[tuple[int, int]] | tuple[int, Literal[1, 2, 3], int] +) """ Marker specification. See :doc:`/gallery/lines_bars_and_markers/marker_reference`. """ From 77f5c8c8db66707fb963815b11c6c8397b7fe75d Mon Sep 17 00:00:00 2001 From: ZPyrolink <38cz74@gmail.com> Date: Fri, 4 Jul 2025 21:30:46 +0200 Subject: [PATCH 2/5] Revert superfluous changes --- lib/matplotlib/typing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/typing.py b/lib/matplotlib/typing.py index 2695882d31ab..f2f180723890 100644 --- a/lib/matplotlib/typing.py +++ b/lib/matplotlib/typing.py @@ -51,7 +51,7 @@ LineStyleType: TypeAlias = ( Literal["-", "solid", "--", "dashed", "-.", "dashdot", ":", "dotted", - "", "none", " ", "None"] | + "", "none", " ", "None"] | tuple[float, Sequence[float]] ) """ @@ -60,7 +60,7 @@ """ DrawStyleType: TypeAlias = Literal["default", "steps", "steps-pre", "steps-mid", -"steps-post"] + "steps-post"] """See :doc:`/gallery/lines_bars_and_markers/step_demo`.""" MarkEveryType: TypeAlias = ( From 74c11e5e0c77d07c3216e056d1c6cc77c866d487 Mon Sep 17 00:00:00 2001 From: ZPyrolink <38cz74@gmail.com> Date: Fri, 4 Jul 2025 21:44:30 +0200 Subject: [PATCH 3/5] Moved import --- lib/matplotlib/typing.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/matplotlib/typing.py b/lib/matplotlib/typing.py index f2f180723890..af3e324b6e54 100644 --- a/lib/matplotlib/typing.py +++ b/lib/matplotlib/typing.py @@ -1,5 +1,3 @@ -from builtins import list - """ Typing support for Matplotlib @@ -12,6 +10,7 @@ The ``typing`` module and type stub files are considered provisional and may change at any time without a deprecation period. """ +from builtins import list from collections.abc import Hashable, Sequence import pathlib from typing import Any, Callable, Literal, TypeAlias, TypeVar, Union From aaf18bf7bced7a347a26ff7b9d2627e64bdd006e Mon Sep 17 00:00:00 2001 From: ZPyrolink <73246085+ZPyrolink@users.noreply.github.com> Date: Mon, 14 Jul 2025 12:06:24 +0200 Subject: [PATCH 4/5] Remove unnecessary import Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> --- lib/matplotlib/typing.py | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/matplotlib/typing.py b/lib/matplotlib/typing.py index af3e324b6e54..cfcd583dec48 100644 --- a/lib/matplotlib/typing.py +++ b/lib/matplotlib/typing.py @@ -10,7 +10,6 @@ The ``typing`` module and type stub files are considered provisional and may change at any time without a deprecation period. """ -from builtins import list from collections.abc import Hashable, Sequence import pathlib from typing import Any, Callable, Literal, TypeAlias, TypeVar, Union From f6e657f803f4ed44f48c6dd56c23e7d11ed8c433 Mon Sep 17 00:00:00 2001 From: ZPyrolink <38cz74@gmail.com> Date: Tue, 15 Jul 2025 18:57:32 +0200 Subject: [PATCH 5/5] Correct integers values on MarkerType --- lib/matplotlib/typing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/typing.py b/lib/matplotlib/typing.py index cfcd583dec48..3090de0f18cf 100644 --- a/lib/matplotlib/typing.py +++ b/lib/matplotlib/typing.py @@ -76,8 +76,8 @@ "1", "2", "3", "4", "8", "s", "p", "P", "*", "h", "H", "+", "x", "X", "D", "d", "|", "_", "none", " ", - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 - ] | list[tuple[int, int]] | tuple[int, Literal[1, 2, 3], int] + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 + ] | list[tuple[int, int]] | tuple[int, Literal[0, 1, 2], int] ) """ Marker specification. See :doc:`/gallery/lines_bars_and_markers/marker_reference`.
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: