Skip to content

Commit 232efe6

Browse files
committed
Fix comment format and exception type for tdi plotting.
1 parent 4eff697 commit 232efe6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandas/tseries/plotting.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,9 @@ def _maybe_convert_index(ax, data):
281281
# Do we need the rest for convenience?
282282

283283
def format_timedelta_ticks(x, pos, n_decimals):
284-
''' Convert seconds to 'D days HH:MM:SS.F' '''
284+
"""
285+
Convert seconds to 'D days HH:MM:SS.F'
286+
"""
285287
s, ns = divmod(x, 1e9)
286288
m, s = divmod(s, 60)
287289
h, m = divmod(m, 60)
@@ -342,6 +344,6 @@ def format_dateaxis(subplot, freq, index):
342344
lambda x, pos: format_timedelta_ticks(x, pos, n_decimals))
343345
subplot.xaxis.set_major_formatter(formatter)
344346
else:
345-
raise IOError('index type not supported')
347+
raise TypeError('index type not supported')
346348

347349
pylab.draw_if_interactive()

0 commit comments

Comments
 (0)