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 1b3fb65

Browse filesBrowse files
committed
remove masked/invalid points after forcing to iterable
1 parent 61c214e commit 1b3fb65
Copy full SHA for 1b3fb65

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -966,15 +966,15 @@ def hlines(self, y, xmin, xmax, colors='k', linestyles='solid',
966966
xmin = self.convert_xunits(xmin)
967967
xmax = self.convert_xunits(xmax)
968968

969-
y, xmin, xmax = cbook.delete_masked_points(y, xmin, xmax)
970-
971969
if not iterable(y):
972970
y = [y]
973971
if not iterable(xmin):
974972
xmin = [xmin]
975973
if not iterable(xmax):
976974
xmax = [xmax]
977975

976+
y, xmin, xmax = cbook.delete_masked_points(y, xmin, xmax)
977+
978978
y = np.ravel(y)
979979
xmin = np.resize(xmin, y.shape)
980980
xmax = np.resize(xmax, y.shape)
@@ -1048,15 +1048,15 @@ def vlines(self, x, ymin, ymax, colors='k', linestyles='solid',
10481048
ymin = self.convert_yunits(ymin)
10491049
ymax = self.convert_yunits(ymax)
10501050

1051-
x, ymin, ymax = cbook.delete_masked_points(x, ymin, ymax)
1052-
10531051
if not iterable(x):
10541052
x = [x]
10551053
if not iterable(ymin):
10561054
ymin = [ymin]
10571055
if not iterable(ymax):
10581056
ymax = [ymax]
10591057

1058+
x, ymin, ymax = cbook.delete_masked_points(x, ymin, ymax)
1059+
10601060
x = np.ravel(x)
10611061
ymin = np.resize(ymin, x.shape)
10621062
ymax = np.resize(ymax, x.shape)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.