mirror of
https://github.com/clearml/clearml
synced 2025-06-26 18:16:07 +00:00
Fix matplotlib 3.3.3 support
This commit is contained in:
parent
4aa5c620f4
commit
f11a36f3c3
@ -18,11 +18,19 @@ class Renderer(object):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def ax_has_xgrid(ax):
|
def ax_has_xgrid(ax):
|
||||||
return bool(ax and ax.xaxis._gridOnMajor and ax.yaxis.get_gridlines())
|
if not ax:
|
||||||
|
return False
|
||||||
|
_gridOnMajor = ax.xaxis._gridOnMajor if hasattr(ax.xaxis, '_gridOnMajor') \
|
||||||
|
else ax.xaxis._major_tick_kw['gridOn']
|
||||||
|
return bool(ax and _gridOnMajor and ax.yaxis.get_gridlines())
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def ax_has_ygrid(ax):
|
def ax_has_ygrid(ax):
|
||||||
return bool(ax and ax.yaxis._gridOnMajor and ax.yaxis.get_gridlines())
|
if not ax:
|
||||||
|
return False
|
||||||
|
_gridOnMajor = ax.yaxis._gridOnMajor if hasattr(ax.yaxis, '_gridOnMajor') \
|
||||||
|
else ax.yaxis._major_tick_kw['gridOn']
|
||||||
|
return bool(ax and _gridOnMajor and ax.yaxis.get_gridlines())
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def current_ax_zoomable(self):
|
def current_ax_zoomable(self):
|
||||||
|
@ -243,7 +243,8 @@ def get_axis_properties(axis):
|
|||||||
|
|
||||||
def get_grid_style(axis):
|
def get_grid_style(axis):
|
||||||
gridlines = axis.get_gridlines()
|
gridlines = axis.get_gridlines()
|
||||||
if axis._gridOnMajor and len(gridlines) > 0:
|
_gridOnMajor = axis._gridOnMajor if hasattr(axis, '_gridOnMajor') else axis._major_tick_kw['gridOn']
|
||||||
|
if _gridOnMajor and len(gridlines) > 0:
|
||||||
color = export_color(gridlines[0].get_color())
|
color = export_color(gridlines[0].get_color())
|
||||||
alpha = gridlines[0].get_alpha()
|
alpha = gridlines[0].get_alpha()
|
||||||
dasharray = get_dasharray(gridlines[0])
|
dasharray = get_dasharray(gridlines[0])
|
||||||
|
Loading…
Reference in New Issue
Block a user