Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bode diagram plot issue #357

Open
mbriday opened this issue Oct 15, 2023 · 4 comments
Open

Bode diagram plot issue #357

mbriday opened this issue Oct 15, 2023 · 4 comments

Comments

@mbriday
Copy link

mbriday commented Oct 15, 2023

Hi,
Thanks for this great python module!!

Environment (OS, Python version, PySpice version, simulator)

Linux Debian 12.1 with Python 3.11.2, pyspice v1.5, installed from pip3 (using a venv)

Actual Behaviour

There is an issue with matplotlib (installed using pip3) , the example filter/low-pass-rc-filter.py does not work. It complains about 'basex' and stops the script:

Traceback (most recent call last):
  File "spice/examples/filter/low-pass-rc-filter.py", line 44, in <module>
    bode_diagram(axes=axes,
[...]
TypeError: LogScale.__init__() got an unexpected keyword argument 'basex'

Steps to reproduce the behaviour

just run the filter/low-pass-rc-filter.py example, using Python 3.11.2 and pip3 (matplotlib, pyspice).

workaround

from semilog matplotlib doc, replacing basex with base in lines 36 and 46 of file PySpice/Plot/BodeDiagram.py fix the problem.

regards,
Mik

@cdivry
Copy link

cdivry commented Oct 20, 2023

hello, same problem encountered here.

you should have a look on PR #358 proposal (need maintainer review)

@lionelsaintecluque
Copy link

I faced the bug and I applied the patch proposed above (PR#358).

It resolves the issue and does not causes unwanted behaviour.

@stan3c
Copy link

stan3c commented Mar 30, 2024

This keywords "basex", basey" were replaced in the most recent matplotlib releases.
So you either need to downgrade the matplotlib or fix PySpice.
So really PySpice needs a fix to support latest matplotlib.
see: https://stackoverflow.com/questions/71213873/receiving-typeerror-init-got-an-unexpected-keyword-argument-basey-in

@shahnewazRvis
Copy link

for matplotlib version 3.5.1
changing function call axe.semilogx(frequency, phase, base=10, **kwargs) works.

Matplotlib (version 3.5.1) throws error with basex keyword which has been used in BodeDiagram.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants