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

Commit55320d3

Browse files
committed
Discourage alternate strings for 'none' linestyle
Inspired by but independent of the discussion around the representation of linestyles#29304.For other linestyles we have a short visual representation (e.g. "--") and a name (dashed "dashed"). No linestyle currently has four accepted writings "", " ", "none", "None".This PR recommends only to use "" (visual representation) and "none" (named representation). It discourages " " and "None". This should guide users towards more canonical usage. We may later decide whether to deprecate the alternatives.Note also, that we have not used the alternatives in examples.
1 parent3aebcb7 commit55320d3

File tree

3 files changed

+27
-27
lines changed

3 files changed

+27
-27
lines changed

‎lib/matplotlib/inset.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,15 @@ def set_linestyle(self, ls):
119119
"""
120120
Set the linestyle of the rectangle and the connectors.
121121
122-
========================================== =================
123-
linestyle description
124-
========================================== =================
125-
``'-'`` or ``'solid'`` solid line
126-
``'--'`` or ``'dashed'`` dashed line
127-
``'-.'`` or ``'dashdot'`` dash-dotted line
128-
``':'`` or ``'dotted'`` dotted line
129-
``'none'``,``'None'``,``''``,or``''`` draw nothing
130-
========================================== =================
122+
=======================================================================
123+
linestyledescription
124+
=======================================================================
125+
``'-'`` or ``'solid'``solid line
126+
``'--'`` or ``'dashed'``dashed line
127+
``'-.'`` or ``'dashdot'``dash-dotted line
128+
``':'`` or ``'dotted'``dotted line
129+
``''`` or``'none'`` (discouraged:``'None'``, ``''``) draw nothing
130+
=======================================================================
131131
132132
Alternatively a dash tuple of the following form can be provided::
133133

‎lib/matplotlib/lines.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,15 +1152,15 @@ def set_linestyle(self, ls):
11521152
11531153
- A string:
11541154
1155-
========================================== =================
1156-
linestyle description
1157-
========================================== =================
1158-
``'-'`` or ``'solid'`` solid line
1159-
``'--'`` or``'dashed'`` dashed line
1160-
``'-.'`` or``'dashdot'`` dash-dotted line
1161-
``':'`` or ``'dotted'`` dotted line
1162-
``'none'``,``'None'``,``''``,or``''`` draw nothing
1163-
========================================== =================
1155+
=======================================================================
1156+
linestyledescription
1157+
=======================================================================
1158+
``'-'`` or ``'solid'``solid line
1159+
``'--'`` or ``'dashed'`` dashed line
1160+
``'-.'`` or ``'dashdot'`` dash-dotted line
1161+
``':'`` or ``'dotted'``dotted line
1162+
``''`` or``'none'`` (discouraged:``'None'``, ``''``) draw nothing
1163+
=======================================================================
11641164
11651165
- Alternatively a dash tuple of the following form can be
11661166
provided::

‎lib/matplotlib/patches.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -445,15 +445,15 @@ def set_linestyle(self, ls):
445445
"""
446446
Set the patch linestyle.
447447
448-
========================================== =================
449-
linestyle description
450-
========================================== =================
451-
``'-'`` or ``'solid'`` solid line
452-
``'--'`` or``'dashed'`` dashed line
453-
``'-.'`` or``'dashdot'`` dash-dotted line
454-
``':'`` or ``'dotted'`` dotted line
455-
``'none'``,``'None'``,``''``,or``''`` draw nothing
456-
========================================== =================
448+
=======================================================================
449+
linestyledescription
450+
=======================================================================
451+
``'-'`` or ``'solid'``solid line
452+
``'--'`` or ``'dashed'`` dashed line
453+
``'-.'`` or ``'dashdot'`` dash-dotted line
454+
``':'`` or ``'dotted'``dotted line
455+
``''`` or``'none'`` (discouraged:``'None'``, ``''``) draw nothing
456+
=======================================================================
457457
458458
Alternatively a dash tuple of the following form can be provided::
459459

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp