Skip to content

Commit

Permalink
fix(matplotlib): axes kwargs updated (basex,basey) -> (base_x,base_y)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdivry committed Oct 20, 2023
1 parent 1fb97dc commit 101cd82
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions PySpice/Plot/BodeDiagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

def bode_diagram_gain(axe, frequency, gain, **kwargs):

axe.semilogx(frequency, gain, basex=10, **kwargs)
axe.semilogx(frequency, gain, base_x=10, **kwargs)
axe.grid(True)
axe.grid(True, which='minor')
axe.set_xlabel("Frequency [Hz]")
Expand All @@ -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_x=10, **kwargs)
axe.set_ylim(-math.pi, math.pi)
axe.grid(True)
axe.grid(True, which='minor')
Expand Down
4 changes: 2 additions & 2 deletions examples/diode/diode-characteristic-curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -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_y=10)
ax2.semilogy(analysis.out[10:-1], dynamic_resistance[10:], base_y=10)
ax2.axvline(x=0, color='black')
ax2.axvline(x=silicon_forward_voltage_threshold, color='red')
ax2.axhline(y=1, color='red')
Expand Down
2 changes: 1 addition & 1 deletion examples/diode/zener-characteristic-curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -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_y=10)
ax2.axvline(x=0, color='black')
ax2.axvline(x=-5.6, color='red')
ax2.legend(('Dynamic Resistance',), loc=(.1,.8))
Expand Down

0 comments on commit 101cd82

Please sign in to comment.