Skip to content

Commit cd8fcfd

Browse files
committed
address review comments from @slivingston
1 parent 9c6ff85 commit cd8fcfd

File tree

8 files changed

+32
-21
lines changed

8 files changed

+32
-21
lines changed

control/freqplot.py

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def bode_plot(
167167
string (see :func:`~matplotlib.pyplot.legend`).
168168
legend_loc : int or str, optional
169169
Include a legend in the given location. Default is 'center right',
170-
with no legend for a single response. Use False to supress legend.
170+
with no legend for a single response. Use False to suppress legend.
171171
margins_method : str, optional
172172
Method to use in computing margins (see :func:`stability_margins`).
173173
omega_limits : array_like of two values
@@ -1582,8 +1582,8 @@ def nyquist_plot(
15821582
Label every nth frequency on the plot. If not specified, no labels
15831583
are generated.
15841584
legend_loc : int or str, optional
1585-
Include a legend in the given location. Default is 'center right',
1586-
with no legend for a single response. Use False to supress legend.
1585+
Include a legend in the given location. Default is 'upper right',
1586+
with no legend for a single response. Use False to suppress legend.
15871587
max_curve_magnitude : float, optional
15881588
Restrict the maximum magnitude of the Nyquist plot to this value.
15891589
Portions of the Nyquist plot whose magnitude is restricted are
@@ -2137,7 +2137,7 @@ def gangof4_response(
21372137
def gangof4_plot(
21382138
*args, omega=None, omega_limits=None, omega_num=None,
21392139
Hz=False, **kwargs):
2140-
"""Plot the response of the "Gange of 4" transfer functions for a system.
2140+
"""Plot the response of the "Gang of 4" transfer functions for a system.
21412141
21422142
Plots a 2x2 frequency response for the "Gang of 4" sensitivity
21432143
functions [T, PS; CS, S]. Can be called in one of two ways:
@@ -2168,9 +2168,20 @@ def gangof4_plot(
21682168
21692169
Returns
21702170
-------
2171-
response : :class:`~control.FrequencyResponseData`
2172-
Frequency response with inputs 'r' and 'd' and outputs 'y', and 'u'
2173-
representing the 2x2 matrix of transfer functions in the Gang of 4.
2171+
cplt : :class:`ControlPlot` object
2172+
Object containing the data that were plotted:
2173+
2174+
* cplt.lines: 2x2 array of :class:`matplotlib.lines.Line2D`
2175+
objects for each line in the plot. The value of each array
2176+
entry is a list of Line2D objects in that subplot.
2177+
2178+
* cplt.axes: 2D array of :class:`matplotlib.axes.Axes` for the plot.
2179+
2180+
* cplt.figure: :class:`matplotlib.figure.Figure` containing the plot.
2181+
2182+
* cplt.legend: legend object(s) contained in the plot
2183+
2184+
See :class:`ControlPlot` for more detailed information.
21742185
21752186
"""
21762187
if len(args) == 1 and isinstance(arg, FrequencyResponseData):
@@ -2332,7 +2343,7 @@ def singular_values_plot(
23322343
system.
23332344
legend_loc : int or str, optional
23342345
Include a legend in the given location. Default is 'center right',
2335-
with no legend for a single response. Use False to supress legend.
2346+
with no legend for a single response. Use False to suppress legend.
23362347
omega_limits : array_like of two values
23372348
Set limits for plotted frequency range. If Hz=True the limits are
23382349
in Hz otherwise in rad/s. Specifying ``omega`` as a list of two

control/nichols.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def nichols_plot(
8787
system.
8888
legend_loc : int or str, optional
8989
Include a legend in the given location. Default is 'upper left',
90-
with no legend for a single response. Use False to supress legend.
90+
with no legend for a single response. Use False to suppress legend.
9191
show_legend : bool, optional
9292
Force legend to be shown if ``True`` or hidden if ``False``. If
9393
``None``, then show legend when there is more than one line on the

control/pzmap.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ def pole_zero_plot(
243243
label(s). If data is a list, strings should be specified for each
244244
system.
245245
legend_loc : int or str, optional
246-
Include a legend in the given location. Default is 'center right',
247-
with no legend for a single response. Use False to supress legend.
246+
Include a legend in the given location. Default is 'upper right',
247+
with no legend for a single response. Use False to suppress legend.
248248
marker_color : str, optional
249249
Set the color of the markers used for poles and zeros.
250250
marker_size : int, optional
@@ -273,10 +273,10 @@ def pole_zero_plot(
273273
use matplotlib.pyplot.gca().axis('auto') and then set the axis
274274
limits to the desired values.
275275
276-
2. Pole/zero plts that use the continuous time omega-damping grid do
276+
2. Pole/zero plots that use the continuous time omega-damping grid do
277277
not work with the ``ax`` keyword argument, due to the way that axes
278278
grids are implemented. The ``grid`` argument must be set to
279-
``False`` or `'empty'`` when using the ``ax`` keyword argument.
279+
``False`` or ``'empty'`` when using the ``ax`` keyword argument.
280280
281281
"""
282282
# Get parameter values

control/rlocus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def root_locus_plot(
171171
system.
172172
legend_loc : int or str, optional
173173
Include a legend in the given location. Default is 'center right',
174-
with no legend for a single response. Use False to supress legend.
174+
with no legend for a single response. Use False to suppress legend.
175175
show_legend : bool, optional
176176
Force legend to be shown if ``True`` or hidden if ``False``. If
177177
``None``, then show legend when there is more than one line on the

control/timeplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def time_response_plot(
122122
string (see :func:`~matplotlib.pyplot.legend`).
123123
legend_loc : int or str, optional
124124
Include a legend in the given location. Default is 'center right',
125-
with no legend for a single response. Use False to supress legend.
125+
with no legend for a single response. Use False to suppress legend.
126126
output_props : array of dicts, optional
127127
List of line properties to use when plotting combined outputs. The
128128
default values are set by config.defaults['timeplot.output_props'].

control/timeresp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class TimeResponseData:
111111
:attr:`time`, :attr:`outputs`, :attr:`states`, :attr:`inputs`. When
112112
accessing time responses via their properties, squeeze processing is
113113
applied so that (by default) single-input, single-output systems will have
114-
the output and input indices supressed. This behavior is set using the
114+
the output and input indices suppressed. This behavior is set using the
115115
``squeeze`` keyword.
116116
117117
Attributes

doc/plotting.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ various ways. The following general rules apply:
456456

457457
The :func:`~control.bode_plot`, :func:`~control.time_response_plot`,
458458
and selected other commands can also accept a matplotlib format
459-
string (e.g., 'r--'). The format string must appear as a positional
459+
string (e.g., ``'r--'``). The format string must appear as a positional
460460
argument right after the required data argument.
461461

462462
Note that line property arguments are the same for all lines generated as
@@ -482,8 +482,8 @@ various ways. The following general rules apply:
482482
locus plots), the default labels are the system name.
483483

484484
If ``label`` is set to ``False``, individual lines are still given
485-
labels, but no legend is generated in the plot (this can also be
486-
accomplished by setting ``legend_map`` to ``False``.
485+
labels, but no legend is generated in the plot. (This can also be
486+
accomplished by setting ``legend_map`` to ``False``).
487487

488488
Note: the ``label`` keyword argument is not implemented for describing
489489
function plots or phase plane plots, since these plots are primarily
@@ -501,7 +501,7 @@ various ways. The following general rules apply:
501501
the ``legend_loc`` keyword argument is set to a string or integer, it
502502
will set the position of the legend as described in the
503503
:func:`matplotlib.legend` documentation. Finally, ``legend_map`` can be
504-
set to an` array that matches the shape of the subplots, with each item
504+
set to an array that matches the shape of the subplots, with each item
505505
being a string indicating the location of the legend for that axes (or
506506
``None`` for no legend).
507507

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ dynamic = ["version"]
4040
packages = ["control"]
4141

4242
[project.optional-dependencies]
43-
test = ["pytest", "pytest-timeout"]
43+
test = ["pytest", "pytest-timeout", "ruff"]
4444
slycot = [ "slycot>=0.4.0" ]
4545
cvxopt = [ "cvxopt>=1.2.0" ]
4646

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy