Skip to content

Commit 4f2739d

Browse files
committed
fix phase plot lines output
1 parent d810d5a commit 4f2739d

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

control/phaseplot.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,7 @@ def equilpoints(
532532
out = []
533533
for xeq in equilpts:
534534
with plt.rc_context(rcParams):
535-
out.append(
536-
ax.plot(xeq[0], xeq[1], marker='o', color=color))
535+
out += ax.plot(xeq[0], xeq[1], marker='o', color=color)
537536
return out
538537

539538

@@ -649,8 +648,7 @@ def separatrices(
649648
for i, xeq in enumerate(equilpts):
650649
# Plot the equilibrium points
651650
with plt.rc_context(rcParams):
652-
out.append(
653-
ax.plot(xeq[0], xeq[1], marker='o', color='k'))
651+
out += ax.plot(xeq[0], xeq[1], marker='o', color='k')
654652

655653
# Figure out the linearization and eigenvectors
656654
evals, evecs = np.linalg.eig(sys.linearize(xeq, 0, params=params).A)
@@ -691,13 +689,13 @@ def separatrices(
691689
# Plot the trajectory (if there is one)
692690
if traj.shape[1] > 1:
693691
with plt.rc_context(rcParams):
694-
out.append(ax.plot(
695-
traj[0], traj[1], color=color, linestyle=linestyle))
692+
out += ax.plot(
693+
traj[0], traj[1], color=color, linestyle=linestyle)
696694

697695
# Add arrows to the lines at specified intervals
698696
with plt.rc_context(rcParams):
699697
_add_arrows_to_line2D(
700-
ax, out[-1][0], arrow_pos, arrowstyle=arrow_style,
698+
ax, out[-1], arrow_pos, arrowstyle=arrow_style,
701699
dir=1)
702700
return out
703701

0 commit comments

Comments
 (0)