Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions control/phaseplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,8 +532,7 @@ def equilpoints(
out = []
for xeq in equilpts:
with plt.rc_context(rcParams):
out.append(
ax.plot(xeq[0], xeq[1], marker='o', color=color))
out += ax.plot(xeq[0], xeq[1], marker='o', color=color)
return out


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

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

# Add arrows to the lines at specified intervals
with plt.rc_context(rcParams):
_add_arrows_to_line2D(
ax, out[-1][0], arrow_pos, arrowstyle=arrow_style,
ax, out[-1], arrow_pos, arrowstyle=arrow_style,
dir=1)
return out

Expand Down
Loading