From 0354153454d197c09faba04568c7e0835a422794 Mon Sep 17 00:00:00 2001 From: Olivier BICHLER <olivier.bichler@cea.fr> Date: Wed, 5 Feb 2025 11:50:41 +0100 Subject: [PATCH] Fix issue eclipse/aidge/aidge#243 --- aidge_core/static_analysis.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aidge_core/static_analysis.py b/aidge_core/static_analysis.py index c65a102a1..b4a82a4fb 100644 --- a/aidge_core/static_analysis.py +++ b/aidge_core/static_analysis.py @@ -136,7 +136,8 @@ class StaticAnalysisExt(aidge_core.StaticAnalysis): bot += serie else: plt.bar(names_only, values) - ax.yaxis.minorticks_on() + if callable(getattr(ax.yaxis, 'minorticks_on', None)): + ax.yaxis.minorticks_on() # introduced in matplotlib 3.9.x plt.grid(axis='y', which='major', linestyle='--', color='gray') plt.grid(axis='y', which='minor', linestyle=':', color='lightgray') formatter0 = matplotlib.ticker.EngFormatter(unit='') @@ -171,7 +172,8 @@ class StaticAnalysisExt(aidge_core.StaticAnalysis): left += serie else: plt.barh(names_only, values) - ax.xaxis.minorticks_on() + if callable(getattr(ax.xaxis, 'minorticks_on', None)): + ax.xaxis.minorticks_on() # introduced in matplotlib 3.9.x plt.grid(axis='x', which='major', linestyle='--', color='gray') plt.grid(axis='x', which='minor', linestyle=':', color='lightgray') formatter0 = matplotlib.ticker.EngFormatter(unit='') -- GitLab