From d79f2751c08941db5b0019e8ba168e4ff156ec05 Mon Sep 17 00:00:00 2001 From: Cyber-G Date: Tue, 13 Aug 2024 17:07:38 +0200 Subject: [PATCH] diode-characteristic-curve.py: fix TypeError: LogScale.__init__() got an unexpected keyword argument 'basey' Error : Traceback (most recent call last): File "***/PySpice/examples/diode/diode-characteristic-curve.py", line 187, in ax2.semilogy(analysis.out, static_resistance, basey=10) File "***/pyspice3.11-venv/lib/python3.11/site-packages/matplotlib/axes/_axes.py", line 1958, in semilogy self.set_yscale('log', **d) File "***/pyspice3.11-venv/lib/python3.11/site-packages/matplotlib/axes/_base.py", line 73, in wrapper return get_method(self)(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "***/pyspice3.11-venv/lib/python3.11/site-packages/matplotlib/axis.py", line 837, in _set_axes_scale ax._axis_map[name]._set_scale(value, **kwargs) File "***/pyspice3.11-venv/lib/python3.11/site-packages/matplotlib/axis.py", line 796, in _set_scale self._scale = mscale.scale_factory(value, self, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "***/pyspice3.11-venv/lib/python3.11/site-packages/matplotlib/scale.py", line 717, in scale_factory return scale_cls(axis, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: LogScale.__init__() got an unexpected keyword argument 'basey' --- examples/diode/diode-characteristic-curve.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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')