Skip to content

Commit 9d30d56

Browse files
jor-tacaswell
authored andcommitted
MAINT: LogLocator: error messages in subs changed
1 parent fd04111 commit 9d30d56

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
@@ -2385,13 +2385,13 @@ def subs(self, subs):
23852385
try:
23862386
self._subs = np.asarray(subs, dtype=float)
23872387
except ValueError as e:
2388-
raise ValueError("If subs is not None and not a string, "
2389-
"it must be a sequence of float.") from e
2388+
raise ValueError("subs must be None, 'all', 'auto' or "
2389+
"a sequence of floats, not "
2390+
"{}.".format(subs)) from e
23902391
if self._subs.ndim != 1:
2391-
raise ValueError("If subs is not None and not a string, it "
2392-
"must be a sequence of float. Hence subs "
2393-
"should have 1 dimension but it has {} "
2394-
"dimensions.".format(self._subs.ndim))
2392+
raise ValueError("A sequence passed to subs must be "
2393+
"1-dimensional, not "
2394+
"{}-dimensional.".format(self._subs.ndim))
23952395

23962396
def __call__(self):
23972397
'Return the locations of the ticks'

0 commit comments

Comments
 (0)