Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a9b4fd5

Browse files
authored
Merge pull request #13187 from jklymak/fix-pandas-datetime
FIX: bar mixed units, allow ValueError as well
2 parents ce9b48c + dd22781 commit a9b4fd5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2057,9 +2057,9 @@ def _convert_dx(dx, x0, xconv, convert):
20572057
dx = [convert(x0 + ddx) - x for ddx in dx]
20582058
if delist:
20592059
dx = dx[0]
2060-
except (TypeError, AttributeError) as e:
2061-
# but doesn't work for 'string' + float, so just
2062-
# see if the converter works on the float.
2060+
except (ValueError, TypeError, AttributeError):
2061+
# if the above fails (for any reason) just fallback to what
2062+
# we do by default and convert dx by iteslf.
20632063
dx = convert(dx)
20642064
return dx
20652065

0 commit comments

Comments
 (0)