10000 address @slivingston review comments · NickThomasMain/python-control@fb2086c · GitHub
[go: up one dir, main page]

Skip to content

Commit fb2086c

Browse files
committed
address @slivingston review comments
1 parent 122c405 commit fb2086c

File tree

9 files changed

+27
-31
lines changed

9 files changed

+27
-31
lines changed

control/ctrlplot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def get_plot_axes(line_array):
223223
224224
.. deprecated:: 0.10.1
225225
This function will be removed in a future version of python-control.
226-
Use `cplt.axes` to obtain axes for a control plot `cplt`.
226+
Use `cplt.axes` to obtain axes for an instance of :class:`ControlPlot`.
227227
228228
This function can be used to return the set of axes corresponding
229229
to the line array that is returned by `time_response_plot`. This
@@ -276,7 +276,7 @@ def pole_zero_subplots(
276276
Figure to use for creating subplots.
277277
rcParams : dict
278278
Override the default parameters used for generating plots.
279-
Default is set up config.default['freqplot.rcParams'].
279+
Default is set up config.default['ctrlplot.rcParams'].
280280
281281
Returns
282282
-------

control/dtime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def sample_system(sysc, Ts, method='zoh', alpha=None, prewarp_frequency=None,
8282
Other Parameters
8383
----------------
8484
inputs : int, list of str or None, optional
85-
Description of the system inputs. If not specified, the origional
85+
Description of the system inputs. If not specified, the original
8686
system inputs are used. See :class:`InputOutputSystem` for more
8787
information.
8888
outputs : int, list of str or None, optional

control/freqplot.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,6 @@ def bode_plot(
171171
legend_loc : int or str, optional
172172
Include a legend in the given location. Default is 'center right',
173173
with no legend for a single response. Use False to suppress legend.
174-
magnitude_label : str, optional
175-
Label to use for magnitude axis. Defaults to "Magnitude".
176174
margins_method : str, optional
177175
Method to use in computing margins (see :func:`stability_margins`).
178176
omega_limits : array_like of two values
@@ -187,8 +185,6 @@ def bode_plot(
187185
overlay_inputs, overlay_outputs : bool, optional
188186
If set to True, combine input and/or output signals onto a single
189187
plot and use line colors, labels, and a legend to distinguish them.
190-
phase_label : str, optional
191-
Label to use for phase axis. Defaults to "Phase [rad]".
192188
plot : bool, optional
193189
(legacy) If given, `bode_plot` returns the legacy return values
194190
of magnitude, phase, and frequency. If False, just return the
@@ -211,8 +207,8 @@ def bode_plot(
211207
Set the title of the plot. Defaults to plot type and system name(s).
212208
title_frame : str, optional
213209
Set the frame of reference used to center the plot title. If set to
214-
'axes' (default), the horizontal position of the title will
215-
centered relative to the axes. If set to `figure`, it will be
210+
'axes' (default), the horizontal position of the title will be
211+
centered relative to the axes. If set to 'figure', it will be
216212
centered with respect to the figure (faster execution).
217213
wrap_phase : bool or float
218214
If wrap_phase is `False` (default), then the phase will be unwrapped
@@ -1658,7 +1654,7 @@ def nyquist_plot(
16581654
title_frame : str, optional
16591655
Set the frame of reference used to center the plot title. If set to
16601656
'axes' (default), the horizontal position of the title will
1661-
centered relative to the axes. If set to `figure`, it will be
1657+
centered relative to the axes. If set to 'figure', it will be
16621658
centered with respect to the figure (faster execution).
16631659
warn_nyquist : bool, optional
16641660
If set to 'False', turn off warnings about frequencies above Nyquist.
@@ -2386,7 +2382,7 @@ def singular_values_plot(
23862382
the values with no plot.
23872383
rcParams : dict
23882384
Override the default parameters used for generating plots.
2389-
Default is set up config.default['freqplot.rcParams'].
2385+
Default is set up config.default['ctrlplot.rcParams'].
23902386
show_legend : bool, optional
23912387
Force legend to be shown if ``True`` or hidden if ``False``. If
23922388
``None``, then show legend when there is more than one line on an
@@ -2396,7 +2392,7 @@ def singular_values_plot(
23962392
title_frame : str, optional
23972393
Set the frame of reference used to center the plot title. If set to
23982394
'axes' (default), the horizontal position of the title will
2399-
centered relative to the axes. If set to `figure`, it will be
2395+
centered relative to the axes. If set to 'figure', it will be
24002396
centered with respect to the figure (faster execution).
24012397
24022398
See Also

control/iosys.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class InputOutputSystem(object):
5656
Description of the system inputs. This can be given as an integer
5757
count or a list of strings that name the individual signals. If an
5858
integer count is specified, the names of the signal will be of the
59-
form `s[i]` (where `s` is given by the `input_prefix` parameter and
59+
form 's[i]' (where 's' is given by the `input_prefix` parameter and
6060
has default value 'u'). If this parameter is not given or given as
6161
`None`, the relevant quantity will be determined when possible
6262
based on other information provided to functions using the system.

control/nlsys.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class NonlinearIOSystem(InputOutputSystem):
6666
Description of the system inputs. This can be given as an integer
6767
count or as a list of strings that name the individual signals.
6868
If an integer count is specified, the names of the signal will be
69-
of the form `s[i]` (where `s` is one of `u`, `y`, or `x`). If
69+
of the form 's[i]' (where 's' is one of 'u', 'y', or 'x'). If
7070
this parameter is not given or given as `None`, the relevant
7171
quantity will be determined when possible based on other
7272
information provided to functions using the system.
@@ -1243,7 +1243,7 @@ def nlsys(
12431243
Description of the system inputs. This can be given as an integer
12441244
count or as a list of strings that name the individual signals.
12451245
If an integer count is specified, the names of the signal will be
1246-
of the form `s[i]` (where `s` is one of `u`, `y`, or `x`). If
1246+
of the form 's[i]' (where 's' is one of 'u', 'y', or 'x'). If
12471247
this parameter is not given or given as `None`, the relevant
12481248
quantity will be determined when possible based on other
12491249
information provided to functions using the system.
@@ -1969,7 +1969,7 @@ def linearize(sys, xeq, ueq=None, t=0, params=None, **kw):
19691969
Other Parameters
19701970
----------------
19711971
inputs : int, list of str or None, optional
1972-
Description of the system inputs. If not specified, the origional
1972+
Description of the system inputs. If not specified, the original
19731973
system inputs are used. See :class:`InputOutputSystem` for more
19741974
information.
19751975
outputs : int, list of str or None, optional
@@ -2101,7 +2101,7 @@ def interconnect(
21012101
Description of the system inputs. This can be given as an integer
21022102
count or as a list of strings that name the individual signals. If an
21032103
integer count is specified, the names of the signal will be of the
2104-
form `s[i]` (where `s` is one of `u`, `y`, or `x`). If this parameter
2104+
form 's[i]' (where 's' is one of 'u', 'y', or 'x'). If this parameter
21052105
is not given or given as `None`, the relevant quantity will be
21062106
determined when possible based on other information provided to
21072107
functions using the system.

control/phaseplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ def phase_plot(odefun, X=None, Y=None, scale=1, X0=None, T=None,
10141014
"""(legacy) Phase plot for 2D dynamical systems.
10151015
10161016
.. deprecated:: 0.10.1
1017-
This function is deprecated; use `phase_plane_plot` instead.
1017+
This function is deprecated; use :func:`phase_plane_plot` instead.
10181018
10191019
Produces a vector field or stream line plot for a planar system. This
10201020
function has been replaced by the :func:`~control.phase_plane_map` and

control/statesp.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,15 +1919,12 @@ def rss(states=1, outputs=1, inputs=1, strictly_proper=False, **kwargs):
19191919
19201920
Parameters
19211921
----------
1922-
states : int, list of str, or None
1923-
Description of the system states. Same format as `inputs`.
1924-
outputs : int, list of str, or None
1925-
Description of the system outputs. This can be given as an integer
1926-
count or as a list of strings that name the individual signals. If an
1927-
integer count is specified, the names of the signal will be of the
1928-
form `s[i]` (where `s` is one of `u`, `y`, or `x`).
1929-
inputs : int, list of str, or None
1930-
Description of the system inputs. Same format as `outputs`.
1922+
states, outputs, inputs : int, list of str, or None
1923+
Description of the system states, outputs, and inputs. This can be
1924+
given as an integer count or as a list of strings that name the
1925+
individual signals. If an integer count is specified, the names of
1926+
the signal will be of the form 's[i]' (where 's' is one of 'x',
1927+
'y', or 'u').
19311928
strictly_proper : bool, optional
19321929
If set to 'True', returns a proper system (no direct term).
19331930
dt : None, True or float, optional

control/tests/docstrings_test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,10 @@ def test_parameter_docs(module, prefix):
147147
continue
148148

149149
# Too complicated to check
150-
if f"*{argname}" not in docstring and verbose:
151-
print(f" {name} has positional arguments; "
152-
"check manually")
150+
if f"*{argname}" not in docstring:
151+
if verbose:
152+
print(f" {name} has positional arguments; "
153+
"check manually")
153154
warnings.warn(
154155
f"{name} {argname} has positional arguments; "
155156
"docstring not checked")

doc/plotting.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,11 +654,13 @@ Utility functions
654654
-----------------
655655

656656
These additional functions can be used to manipulate response data or
657-
returned values from plotting routines.
657+
carry out other operations in creating control plots.
658+
658659

659660
.. autosummary::
660661
:toctree: generated/
661662

663+
~control.box_grid
662664
~control.combine_time_responses
663665
~control.pole_zero_subplots
664666
~control.reset_rcParams

0 commit comments

Comments
 (0)
0