Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5493009

Browse files
committed
{Check,Radio}Buttons: Improve docs of label_props
1 parent2b0f3dc commit5493009

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

‎lib/matplotlib/widgets.py‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,8 +1016,11 @@ def __init__(self, ax, labels, actives=None, *, useblit=True,
10161016
10171017
.. versionadded:: 3.7
10181018
1019-
label_props : dict, optional
1020-
Dictionary of `.Text` properties to be used for the labels.
1019+
label_props : dict of lists, optional
1020+
Dictionary of `.Text` properties to be used for the labels. Each
1021+
dictionary value should be a list of at least a single element. If
1022+
the list is of length M, its values are cycled such that the Nth
1023+
label gets the (N mod M) property.
10211024
10221025
.. versionadded:: 3.7
10231026
frame_props : dict, optional
@@ -1117,7 +1120,8 @@ def set_label_props(self, props):
11171120
Parameters
11181121
----------
11191122
props : dict
1120-
Dictionary of `.Text` properties to be used for the labels.
1123+
Dictionary of `.Text` properties to be used for the labels. Same
1124+
format as label_props argument of `__init__`.
11211125
"""
11221126
_api.check_isinstance(dict,props=props)
11231127
props=_expand_text_props(props)
@@ -1585,8 +1589,11 @@ def __init__(self, ax, labels, active=0, activecolor=None, *,
15851589
15861590
.. versionadded:: 3.7
15871591
1588-
label_props : dict or list of dict, optional
1589-
Dictionary of `.Text` properties to be used for the labels.
1592+
label_props : dict of lists, optional
1593+
Dictionary of `.Text` properties to be used for the labels. Each
1594+
dictionary value should be a list of at least a single element. If
1595+
the list is of length M, its values are cycled such that the Nth
1596+
label gets the (N mod M) property.
15901597
15911598
.. versionadded:: 3.7
15921599
radio_props : dict, optional
@@ -1695,7 +1702,8 @@ def set_label_props(self, props):
16951702
Parameters
16961703
----------
16971704
props : dict
1698-
Dictionary of `.Text` properties to be used for the labels.
1705+
Dictionary of `.Text` properties to be used for the labels. Same
1706+
format as label_props argument of `__init__`.
16991707
"""
17001708
_api.check_isinstance(dict,props=props)
17011709
props=_expand_text_props(props)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp