PySpice icon indicating copy to clipboard operation
PySpice copied to clipboard

fix(matplotlib): axes kwargs updated (basex,basey -> base)

Open cdivry opened this issue 2 years ago • 1 comments

Fixing semilog plots from matplotlib

Here's a little fix to update matplotlib latest axis usage

TypeError: LogScale.__init__() got an unexpected keyword argument 'basex'

related issues :

new behavior :

https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.semilogx.html https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.semilogy.html

axis.semilog plots now expects base keyword argument

how to reproduce the bug / test the merge request

requirements :

matplotlib==3.8.0
numpy==1.26.1

test / reproduce :

python3 examples/filter/low-pass-rc-filter.py

cdivry avatar Oct 20 '23 16:10 cdivry

we could even remove this explicit arg, because the default value for base is already 10 https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.semilogx.html#matplotlib-axes-axes-semilogx

image

cdivry avatar Oct 20 '23 18:10 cdivry