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

Appearance settings

Commit 55320d3

Browse filesBrowse 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 parent 3aebcb7 commit 55320d3
Copy full SHA for 55320d3

File tree

3 files changed

+27
-27
lines changed
Filter options

3 files changed

+27
-27
lines changed

‎lib/matplotlib/inset.py

Copy file name to clipboardExpand all lines: lib/matplotlib/inset.py
+9-9Lines 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+
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+
``''`` 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

Copy file name to clipboardExpand all lines: lib/matplotlib/lines.py
+9-9Lines 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+
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+
``''`` 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

Copy file name to clipboardExpand all lines: lib/matplotlib/patches.py
+9-9Lines 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+
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+
``''`` 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.