diff --git a/mplexporter/renderers/base.py b/mplexporter/renderers/base.py index 86258bf..67361ff 100644 --- a/mplexporter/renderers/base.py +++ b/mplexporter/renderers/base.py @@ -18,11 +18,11 @@ def ax_zoomable(ax): @staticmethod def ax_has_xgrid(ax): - return bool(ax and ax.xaxis._major_tick_kw['gridOn'] and ax.yaxis.get_gridlines()) + return bool(ax and ax.xaxis.get_tick_params()['gridOn'] and ax.yaxis.get_gridlines()) @staticmethod def ax_has_ygrid(ax): - return bool(ax and ax.yaxis._major_tick_kw['gridOn'] and ax.yaxis.get_gridlines()) + return bool(ax and ax.yaxis.get_tick_params()['gridOn'] and ax.yaxis.get_gridlines()) @property def current_ax_zoomable(self): diff --git a/mplexporter/utils.py b/mplexporter/utils.py index 22f488a..4d140e4 100644 --- a/mplexporter/utils.py +++ b/mplexporter/utils.py @@ -212,7 +212,7 @@ def get_text_style(text): def get_axis_properties(axis): """Return the property dictionary for a matplotlib.Axis instance""" props = {} - label1On = axis._major_tick_kw.get('label1On', True) + label1On = axis.get_tick_params().get('label1On', True) if isinstance(axis, matplotlib.axis.XAxis): if label1On: @@ -288,7 +288,7 @@ def get_axis_properties(axis): def get_grid_style(axis): gridlines = axis.get_gridlines() - if axis._major_tick_kw['gridOn'] and len(gridlines) > 0: + if axis.get_tick_params()['gridOn'] and len(gridlines) > 0: color = export_color(gridlines[0].get_color()) alpha = gridlines[0].get_alpha() dasharray = get_dasharray(gridlines[0])