Skip to content

Commit 9d33e1f

Browse files
committed
address @slivingston review + other small fixes, cleanup
1 parent 7548738 commit 9d33e1f

File tree

12 files changed

+186
-36
lines changed

12 files changed

+186
-36
lines changed

control/iosys.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def _repr_latex_(self):
332332
def _repr_html_(self):
333333
# Defaults to using __repr__; override in subclasses
334334
return None
335-
335+
336336
def _repr_markdown_(self):
337337
return self._repr_html_()
338338

control/tests/phaseplot_test.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def invpend_ode(t, x, m=0, l=0, b=0, g=0):
167167
ct.phase_plane_plot(
168168
invpend_ode, [-5, 5, 2, 2], params={'stuff': (1, 1, 0.2, 1)},
169169
plot_streamlines=True)
170-
170+
171171
with pytest.raises(ValueError, match="gridtype must be 'meshgrid' when using streamplot"):
172172
ct.phase_plane_plot(ct.rss(2, 1, 1), plot_streamlines=False,
173173
plot_streamplot=True, gridtype='boxgrid')
@@ -190,7 +190,7 @@ def invpend_ode(t, x, m=0, l=0, b=0, g=0):
190190
sys, [-12, 12, -10, 10], 15, gridspec=[2, 9],
191191
plot_streamlines=True, plot_separatrices=False,
192192
suppress_warnings=True)
193-
193+
194194
@pytest.mark.usefixtures('mplcleanup')
195195
def test_phase_plot_zorder():
196196
# some of these tests are a bit akward since the streamlines and separatrices
@@ -211,7 +211,7 @@ def get_zorders(cplt):
211211
assert cplt.lines[3] == None or isinstance(cplt.lines[3], mpl.streamplot.StreamplotSet)
212212
streamplot = max(cplt.lines[3].lines.get_zorder(), cplt.lines[3].arrows.get_zorder()) if cplt.lines[3] else None
213213
return streamlines, quiver, streamplot, separatrices, equilpoints
214-
214+
215215
def assert_orders(streamlines, quiver, streamplot, separatrices, equilpoints):
216216
print(streamlines, quiver, streamplot, separatrices, equilpoints)
217217
if streamlines is not None:
@@ -261,8 +261,6 @@ def sys(t, x):
261261
# make sure changing the norm at least doesn't throw an error
262262
ct.phase_plane_plot(sys, plot_streamplot=dict(vary_color=True, norm=mpl.colors.LogNorm()))
263263

264-
265-
266264

267265
@pytest.mark.usefixtures('mplcleanup')
268266
def test_basic_phase_plots(savefigs=False):

control/timeresp.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -551,10 +551,10 @@ def outputs(self):
551551
def states(self):
552552
"""Time response state vector.
553553
554-
Time evolution of the state vector, indexed indexed by either the
555-
state and time (if only a single trace is given) or the state, trace,
556-
and time (for multiple traces). See `TimeResponseData.squeeze`
557-
for a description of how this can be modified using the `squeeze`
554+
Time evolution of the state vector, indexed by either the state and
555+
time (if only a single trace is given) or the state, trace, and
556+
time (for multiple traces). See `TimeResponseData.squeeze` for a
557+
description of how this can be modified using the `squeeze`
558558
keyword.
559559
560560
Input and output signal names can be used to index the data in
@@ -616,9 +616,9 @@ def inputs(self):
616616
def _legacy_states(self):
617617
"""Time response state vector (legacy version).
618618
619-
Time evolution of the state vector, indexed indexed by either the
620-
state and time (if only a single trace is given) or the state,
621-
trace, and time (for multiple traces).
619+
Time evolution of the state vector, indexed by either the state and
620+
time (if only a single trace is given) or the state, trace, and
621+
time (for multiple traces).
622622
623623
The `legacy_states` property is not affected by the `squeeze` keyword
624624
and hence it will always have these dimensions.

doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Makefile for python-control Sphinx documentation
22
# RMM, 15 Jan 2025
33

4-
FIGS = figures/classes.pdf
4+
FIGS = figures/classes.svg
55
RST_FIGS = figures/flatsys-steering-compare.png \
66
figures/iosys-predprey-open.png \
77
figures/timeplot-servomech-combined.png \

doc/classes.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ user should normally not need to instantiate these directly.
1616

1717
The following figure illustrates the relationship between the classes:
1818

19-
.. figure:: figures/classes.pdf
20-
:width: 480
19+
.. figure:: figures/classes.svg
20+
:width: 640
2121
:align: center
2222

2323
.. autosummary::
@@ -36,7 +36,7 @@ The following figure illustrates the relationship between the classes:
3636

3737
The time response of an input/output system is represented using a
3838
special :class:`NamedSignal` class that allows the individual signal
39-
elements to be access using signal names in palce of integer offsets:
39+
elements to be access using signal names in place of integer offsets:
4040

4141
.. autosummary::
4242
:toctree: generated/
@@ -106,5 +106,5 @@ operations:
106106
optimal.OptimalEstimationProblem
107107
optimal.OptimalEstimationResult
108108

109-
More informaton on the functions used to create these classes can be
109+
More information on the functions used to create these classes can be
110110
found in the :ref:`nonlinear-systems` chapter.

doc/figures/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# RMM, 26 Dec 2024
33

44
# List of figures that need to be created (first figure generated is OK)
5-
FIGS = classes.pdf
5+
FIGS = classes.svg
66

77
# Location of the control package
88
SRCDIR = ../..
@@ -12,5 +12,5 @@ all: $(FIGS)
1212
clean:
1313
/bin/rm -f $(FIGS)
1414

15-
classes.pdf: classes.fig
16-
fig2dev -Lpdf $< $@
15+
classes.svg: classes.fig
16+
fig2dev -Lsvg $< $@

doc/figures/classes.pdf

-6.91 KB
Binary file not shown.

doc/figures/classes.svg

Lines changed: 151 additions & 0 deletions
Loading

doc/phaseplot.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ on a grid, equilibrium points and separatrices if they exist. A variety
4343
of options are available to modify the information that is plotted,
4444
including plotting a grid of vectors instead of streamlines, plotting
4545
streamlines from arbitrary starting points and turning on and off
46-
various features of the plot.
46+
various features of the plot.
4747

4848
To illustrate some of these possibilities, consider a phase plane plot for
4949
an inverted pendulum system, which is created using a mesh grid:

doc/releases/0.10.1-notes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
.. _version-0.10.1:
44

5-
Version 0.10.1 Release Notes (current)
6-
--------------------------------------
5+
Version 0.10.1 Release Notes
6+
----------------------------
77

88
* Released: 17 Aug 2024
99
* `GitHub release page

0 commit comments

Comments
 (0)