Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
additional documentation updates + legacy settings for 0.10.1 Nyquist…
… plots
  • Loading branch information
murrayrm committed Jul 5, 2025
commit d1b005c1eba7d47d63f558bf0c02620f3ac2558f
10 changes: 9 additions & 1 deletion control/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def use_legacy_defaults(version):
Parameters
----------
version : string
Version number of the defaults desired. Ranges from '0.1' to '0.10.1'.
Version number of `python-control` to use for setting defaults.

Examples
--------
Expand Down Expand Up @@ -342,6 +342,14 @@ def use_legacy_defaults(version):
#
reset_defaults() # start from a clean slate

# Version 0.10.2:
if major == 0 and minor < 10 or (minor == 10 and patch < 2):
from math import inf

# Reset Nyquist defaults
set_defaults('nyquist', arrows=2, max_curve_magnitude=20,
blend_fraction=0, indent_points=50)

# Version 0.9.2:
if major == 0 and minor < 9 or (minor == 9 and patch < 2):
from math import inf
Expand Down
6 changes: 3 additions & 3 deletions control/freqplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1659,7 +1659,7 @@ def nyquist_plot(
portions of the contour are plotted using a different line style.
label : str or array_like of str, optional
If present, replace automatically generated label(s) with the given
label(s). If sysdata is a list, strings should be specified for each
label(s). If `data` is a list, strings should be specified for each
system.
label_freq : int, optional
Label every nth frequency on the plot. If not specified, no labels
Expand Down Expand Up @@ -1690,8 +1690,8 @@ def nyquist_plot(
elements is equivalent to providing `omega_limits`.
omega_num : int, optional
Number of samples to use for the frequency range. Defaults to
`config.defaults['freqplot.number_of_samples']`. Ignored if data is
not a list of systems.
`config.defaults['freqplot.number_of_samples']`. Ignored if `data`
is not a system or list of systems.
plot : bool, optional
(legacy) If given, `nyquist_plot` returns the legacy return values
of (counts, contours). If False, return the values with no plot.
Expand Down
2 changes: 1 addition & 1 deletion control/matlab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

This subpackage contains a number of functions that emulate some of
the functionality of MATLAB. The intent of these functions is to
provide a simple interface to the python control systems library
provide a simple interface to the Python Control Systems Library
(python-control) for people who are familiar with the MATLAB Control
Systems Toolbox (tm).

Expand Down
4 changes: 2 additions & 2 deletions doc/develop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ Filenames
* Source files are lower case, usually less than 10 characters (and 8
or less is better).

* Unit tests (in `control/tests/`) are of the form `module_test.py` or
`module_function.py`.
* Unit tests (in `control/tests/`) are of the form `module_test.py`,
`module_functionality_test.py`, or `functionality_test.py`.


Class names
Expand Down
6 changes: 3 additions & 3 deletions doc/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ some things to keep in mind:

* Vectors and matrices used as arguments to functions can be written
using lists, with commas required between elements and column
vectors implemented as nested list . So [1 2 3] must be written as
vectors implemented as nested lists. So [1 2 3] must be written as
[1, 2, 3] and matrices are written using 2D nested lists, e.g., [[1,
2], [3, 4]].
* Functions that in MATLAB would return variable numbers of values
Expand All @@ -150,12 +150,12 @@ This documentation has a number of notional conventions and functionality:
Manual, which contains documentation for all functions, classes,
configurable default parameters, and other detailed information.

* Class, functions, and methods with additional documentation appear
* Classes, functions, and methods with additional documentation appear
in a bold, code font that link to the Reference Manual. Example: `ss`.

* Links to other sections appear in blue. Example: :ref:`nonlinear-systems`.

* Parameters appear in a (non-bode) code font, as do code fragments.
* Parameters appear in a (non-bold) code font, as do code fragments.
Example: `omega`.

* Example code is contained in code blocks that can be copied using
Expand Down
19 changes: 10 additions & 9 deletions doc/releases/0.10.2-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ Version 0.10.2 Release Notes (current)
* `GitHub release page
<https://github.com/python-control/python-control/releases/tag/0.10.2>`_

This release contains numerous bug fixes and improvements, including
substantial updates to the documentation, including refactoring of the
online manual into a User Guide and a Reference Manual, as well as
more consistent and complete docstrings. In addition, signals and
systems can now be referenced using signal labels in addition to
offsets, and phase plane plots make use of the matplotlib
`~matplotlib.pyplot.streamplot` function. Numerous other changes have
been made to improve consistency of keyword arguments and function
names, with legacy aliases available.
This release includes numerous bug fixes and improvements, with major
changes such as a substantial reorganization of the documentation into
a User Guide and Reference Manual, more consistent and complete
docstrings, and support for referencing signals and subsystems by name
as well as by index. Phase plane plots now use matplotlib’s
`streamplot` for better visuals. New functions include `combine_tf`
and `split_tf` for MIMO/SISO conversion and `disk_margins` for
stability analysis. Additional improvements include consistent keyword
usage, expanded LTI system methods for plotting and responses, better
error messages, and legacy aliases to maintain backward compatibility.

This version of `python-control` requires Python 3.10 or higher, NumPy
1.23 or higher (2.x recommended), and SciPy 1.8 or higher.
Expand Down
6 changes: 3 additions & 3 deletions examples/python-control_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"id": "qMVGK15gNQw2"
},
"source": [
"## Example 1: Open loop analysis of a coupled mass spring system\n",
"## Example 1: Open Loop Analysis of a Coupled Mass Spring System\n",
"\n",
"Consider the spring mass system below:\n",
"\n",
Expand Down Expand Up @@ -781,7 +781,7 @@
"id": "2f27f767-e012-45f9-8b76-cc040cfc89e2",
"metadata": {},
"source": [
"## Example 2: Trajectory tracking for a kinematic vehicle model\n",
"## Example 2: Trajectory Tracking for a Kinematic Vehicle Model\n",
"\n",
"This example illustrates the use of python-control to model, analyze, and design nonlinear control systems.\n",
"\n",
Expand Down Expand Up @@ -1213,7 +1213,7 @@
"id": "03b1fd75-579c-47da-805d-68f155957084",
"metadata": {},
"source": [
"## Computing environment"
"## Computing Environment"
]
},
{
Expand Down