Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mplexporter/renderers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions mplexporter/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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])
Expand Down