PySpice-org / PySpice

Simulate electronic circuit using Python and the Ngspice / Xyce simulators
https://pyspice.fabrice-salvaire.fr
GNU General Public License v3.0
661 stars 175 forks source link

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

Open cdivry opened 1 year ago

cdivry commented 1 year ago

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 commented 1 year ago

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