update 29
This commit is contained in:
parent
011c3fd8d1
commit
9d1395a2a0
2 changed files with 4 additions and 4 deletions
|
@ -24,7 +24,7 @@ HP2 = lambda A, Q: ((1, 0, 0),
|
||||||
(1, 1/Q, 1))
|
(1, 1/Q, 1))
|
||||||
PE2 = lambda A, Q: ((1, A/Q, 1),
|
PE2 = lambda A, Q: ((1, A/Q, 1),
|
||||||
(1, 1/A/Q, 1))
|
(1, 1/A/Q, 1))
|
||||||
AP2 = lambda A, Q: ((1, 1/Q, 1),
|
AP2 = lambda A, Q: ((1, -1/Q, 1),
|
||||||
(1, 1/Q, 1))
|
(1, 1/Q, 1))
|
||||||
BP2a= lambda A, Q: ((0, -A/Q, 0),
|
BP2a= lambda A, Q: ((0, -A/Q, 0),
|
||||||
(1, 1/A/Q, 1))
|
(1, 1/A/Q, 1))
|
||||||
|
|
|
@ -46,7 +46,7 @@ def new_bode(magnitude_offset=0):
|
||||||
response_setup(ax1, ymin, ymax)
|
response_setup(ax1, ymin, ymax)
|
||||||
phase_response_setup(ax2)
|
phase_response_setup(ax2)
|
||||||
|
|
||||||
cc = plt.style.library['ggplot']['axes.color_cycle']
|
cc = plt.style.library['ggplot']['axes.prop_cycle'].by_key()['color']
|
||||||
ax1.set_ylabel(ax1.get_ylabel(), color=cc[0])
|
ax1.set_ylabel(ax1.get_ylabel(), color=cc[0])
|
||||||
ax2.set_ylabel(ax2.get_ylabel(), color=cc[1])
|
ax2.set_ylabel(ax2.get_ylabel(), color=cc[1])
|
||||||
for tl in ax1.get_yticklabels():
|
for tl in ax1.get_yticklabels():
|
||||||
|
@ -57,8 +57,8 @@ def new_bode(magnitude_offset=0):
|
||||||
#ax1.hlines(0, 20, 40, linewidth=0.5, color=cc[0])
|
#ax1.hlines(0, 20, 40, linewidth=0.5, color=cc[0])
|
||||||
#ax2.hlines(0, 10000, 20000, linewidth=0.5, color=cc[1])
|
#ax2.hlines(0, 10000, 20000, linewidth=0.5, color=cc[1])
|
||||||
|
|
||||||
# ax1 will use the initial color, so tell ax2 to iterate to the second
|
# share color cycles to prevent color re-use
|
||||||
next(ax2._get_lines.color_cycle)
|
ax2._get_lines.prop_cycler = ax1._get_lines.prop_cycler
|
||||||
|
|
||||||
# ax1 and ax2 should have identical grids;
|
# ax1 and ax2 should have identical grids;
|
||||||
# disable ax2's so it doesn't overlap ax1's plot lines.
|
# disable ax2's so it doesn't overlap ax1's plot lines.
|
||||||
|
|
Loading…
Reference in a new issue