8000 remove masked/invalid points after forcing to iterable · matplotlib/matplotlib@1b3fb65 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1b3fb65

Browse files
committed
remove masked/invalid points after forcing to iterable
1 parent 61c214e commit 1b3fb65

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/matplotlib/axes/_axes.py

Lines 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