Skip to content

Commit 7fa7dd9

Browse files
committed
MAINT: LogLocator: error messages in subs changed
1 parent 517b575 commit 7fa7dd9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/matplotlib/ticker.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2133,13 +2133,13 @@ def subs(self, subs):
21332133
try:
21342134
self._subs = np.asarray(subs, dtype=float)
21352135
except ValueError as e:
2136-
raise ValueError("If subs is not None and not a string, "
2137-
"it must be a sequence of float.") from e
2136+
raise ValueError("subs must be None, 'all', 'auto' or "
2137+
"a sequence of floats, not "
2138+
"{}.".format(subs)) from e
21382139
if self._subs.ndim != 1:
2139-
raise ValueError("If subs is not None and not a string, it "
2140-
"must be a sequence of float. Hence subs "
2141-
"should have 1 dimension but it has {} "
2142-
"dimensions.".format(self._subs.ndim))
2140+
raise ValueError("A sequence passed to subs must be "
2141+
"1-dimensional, not "
2142+
"{}-dimensional.".format(self._subs.ndim))
21432143

21442144
def __call__(self):
21452145
'Return the locations of the ticks'

0 commit comments

Comments
 (0)