Skip to content

Commit e095900

Browse files
committed
Accept any dateformatter! 'DateFormatter' is always in the string.
There might be a super class we could test the instance of, but this is easy enough for now.
1 parent 12bc928 commit e095900

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plotly/matplotlylib/mpltools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ def prep_ticks(ax, index, ax_type, props):
418418
return dict()
419419
# get tick label formatting information
420420
formatter = axis.get_major_formatter().__class__.__name__
421-
if ax_type == 'x' and formatter == 'DateFormatter':
421+
if ax_type == 'x' and 'DateFormatter' in formatter:
422422
axis_dict['type'] = 'date'
423423
try:
424424
axis_dict['tick0'] = mpl_dates_to_datestrings(axis_dict['tick0'])

0 commit comments

Comments
 (0)