From c7b2fec6740bee46e7ea60f9f9af8f6a9be360d2 Mon Sep 17 00:00:00 2001 From: cdivry Date: Fri, 20 Oct 2023 18:34:41 +0200 Subject: [PATCH] fix(matplotlib): axes kwargs updated (basex,basey -> base) --- PySpice/Plot/BodeDiagram.py | 4 ++-- examples/diode/diode-characteristic-curve.py | 4 ++-- examples/diode/zener-characteristic-curve.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/PySpice/Plot/BodeDiagram.py b/PySpice/Plot/BodeDiagram.py index 5d13f566d..638c86d4c 100644 --- a/PySpice/Plot/BodeDiagram.py +++ b/PySpice/Plot/BodeDiagram.py @@ -33,7 +33,7 @@ def bode_diagram_gain(axe, frequency, gain, **kwargs): - axe.semilogx(frequency, gain, basex=10, **kwargs) + axe.semilogx(frequency, gain, base=10, **kwargs) axe.grid(True) axe.grid(True, which='minor') axe.set_xlabel("Frequency [Hz]") @@ -43,7 +43,7 @@ def bode_diagram_gain(axe, frequency, gain, **kwargs): def bode_diagram_phase(axe, frequency, phase, **kwargs): - axe.semilogx(frequency, phase, basex=10, **kwargs) + axe.semilogx(frequency, phase, base=10, **kwargs) axe.set_ylim(-math.pi, math.pi) axe.grid(True) axe.grid(True, which='minor') diff --git a/examples/diode/diode-characteristic-curve.py b/examples/diode/diode-characteristic-curve.py index 4fba49704..3088e02c0 100755 --- a/examples/diode/diode-characteristic-curve.py +++ b/examples/diode/diode-characteristic-curve.py @@ -184,8 +184,8 @@ def two_scales_tick_formatter(value, position): analysis = analyses[25] static_resistance = -analysis.out / analysis.Vinput dynamic_resistance = np.diff(-analysis.out) / np.diff(analysis.Vinput) -ax2.semilogy(analysis.out, static_resistance, basey=10) -ax2.semilogy(analysis.out[10:-1], dynamic_resistance[10:], basey=10) +ax2.semilogy(analysis.out, static_resistance, base=10) +ax2.semilogy(analysis.out[10:-1], dynamic_resistance[10:], base=10) ax2.axvline(x=0, color='black') ax2.axvline(x=silicon_forward_voltage_threshold, color='red') ax2.axhline(y=1, color='red') diff --git a/examples/diode/zener-characteristic-curve.py b/examples/diode/zener-characteristic-curve.py index 93a2c03c0..b689962c2 100755 --- a/examples/diode/zener-characteristic-curve.py +++ b/examples/diode/zener-characteristic-curve.py @@ -61,7 +61,7 @@ # U = RI R = U/I dynamic_resistance = np.diff(-analysis.out) / np.diff(analysis.Vinput) # ax2.plot(analysis.out[:-1], dynamic_resistance/1000) -ax2.semilogy(analysis.out[10:-1], dynamic_resistance[10:], basey=10) +ax2.semilogy(analysis.out[10:-1], dynamic_resistance[10:], base=10) ax2.axvline(x=0, color='black') ax2.axvline(x=-5.6, color='red') ax2.legend(('Dynamic Resistance',), loc=(.1,.8))