Skip to content

Commit

Permalink
update Axes.grid to support matplotlib >= 3.5 (ECSHackWeek#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdmurbach authored Feb 20, 2023
1 parent 74226f5 commit e754f8b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions impedance/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def plot_nyquist(Z, scale=1, units='Ohms', fmt='.-', ax=None, labelsize=20,
ax.locator_params(axis='y', nbins=5, tight=True)

# Add a light grid
ax.grid(b=True, which='major', axis='both', alpha=.5)
ax.grid(visible=True, which='major', axis='both', alpha=.5)

# Change axis units to 10**log10(scale) and resize the offset text
limits = -np.log10(scale)
Expand Down Expand Up @@ -126,7 +126,7 @@ def plot_bode(f, Z, scale=1, units='Ohms', fmt='.-', axes=None, labelsize=20,
ax.locator_params(axis='y', nbins=5, tight=True)

# Add a light grid
ax.grid(b=True, which='major', axis='both', alpha=.5)
ax.grid(visible=True, which='major', axis='both', alpha=.5)

# Change axis units to 10**log10(scale) and resize the offset text
limits = -np.log10(scale)
Expand Down Expand Up @@ -323,7 +323,7 @@ def plot_residuals(ax, f, res_real, res_imag, fmt='.-', y_limits=(-5, 5),
ax.locator_params(axis='y', nbins=4, tight=True)

# Add a light grid
ax.grid(b=True, which='major', axis='both', alpha=.5)
ax.grid(visible=True, which='major', axis='both', alpha=.5)
ax.legend(fontsize=14)

ax.set_ylim(y_limits)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
altair>=3.0
coveralls==3.2.0
matplotlib>=3.0
matplotlib>=3.5
numpy>=1.14
numpydoc
nbsphinx
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
url="https://impedancepy.readthedocs.io/en/latest/",
packages=setuptools.find_packages(),
python_requires="~=3.7",
install_requires=['altair>=3.0', 'matplotlib>=3.0',
install_requires=['altair>=3.0', 'matplotlib>=3.5',
'numpy>=1.14', 'scipy>=1.0'],
classifiers=(
"Programming Language :: Python :: 3",
Expand Down

0 comments on commit e754f8b

Please sign in to comment.