Skip to content

Commit bbfcfa3

Browse files
committed
fix: config.default[] to config.defaults[]
1 parent 06b462c commit bbfcfa3

8 files changed

Lines changed: 22 additions & 16 deletions

File tree

control/flatsys/bezier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# bezier.m - 1D Bezier curve basis functions
22
# RMM, 24 Feb 2021
33

4-
"""1D Bezier curve basis functions.
4+
r"""1D Bezier curve basis functions.
55
66
The :mod:`control.flatsys.bezier` module defines the
77
:class:`BezierFamily` class, which implements a set of basis functions

control/freqplot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def bode_plot(
196196
If set to `False`, don't plot the magnitude or phase, respectively.
197197
rcParams : dict
198198
Override the default parameters used for generating plots.
199-
Default is set by config.default['ctrlplot.rcParams'].
199+
Default is set by config.defaults['ctrlplot.rcParams'].
200200
share_frequency, share_magnitude, share_phase : str or bool, optional
201201
Determine whether and how axis limits are shared between the
202202
indicated variables. Can be set set to 'row' to share across all
@@ -1663,7 +1663,7 @@ def nyquist_plot(
16631663
determined by config.defaults['nyquist.mirror_style'].
16641664
rcParams : dict
16651665
Override the default parameters used for generating plots.
1666-
Default is set by config.default['ctrlplot.rcParams'].
1666+
Default is set by config.defaults['ctrlplot.rcParams'].
16671667
return_contour : bool, optional
16681668
(legacy) If 'True', return the encirclement count and Nyquist
16691669
contour used to generate the Nyquist plot.
@@ -2413,7 +2413,7 @@ def singular_values_plot(
24132413
the values with no plot.
24142414
rcParams : dict
24152415
Override the default parameters used for generating plots.
2416-
Default is set up config.default['ctrlplot.rcParams'].
2416+
Default is set up config.defaults['ctrlplot.rcParams'].
24172417
show_legend : bool, optional
24182418
Force legend to be shown if ``True`` or hidden if ``False``. If
24192419
``None``, then show legend when there is more than one line on an

control/nichols.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def nichols_plot(
8181
with no legend for a single response. Use False to suppress legend.
8282
rcParams : dict
8383
Override the default parameters used for generating plots.
84-
Default is set by config.default['ctrlplot.rcParams'].
84+
Default is set by config.defaults['ctrlplot.rcParams'].
8585
show_legend : bool, optional
8686
Force legend to be shown if ``True`` or hidden if ``False``. If
8787
``None``, then show legend when there is more than one line on the

control/phaseplot.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def phase_plane_plot(
149149
in the dict as keywords to :func:`~control.phaseplot.separatrices`.
150150
rcParams : dict
151151
Override the default parameters used for generating plots.
152-
Default is set by config.default['ctrlplot.rcParams'].
152+
Default is set by config.defaults['ctrlplot.rcParams'].
153153
suppress_warnings : bool, optional
154154
If set to `True`, suppress warning messages in generating trajectories.
155155
title : str, optional
@@ -290,7 +290,7 @@ def vectorfield(
290290
----------------
291291
rcParams : dict
292292
Override the default parameters used for generating plots.
293-
Default is set by config.default['ctrlplot.rcParams'].
293+
Default is set by config.defaults['ctrlplot.rcParams'].
294294
suppress_warnings : bool, optional
295295
If set to `True`, suppress warning messages in generating trajectories.
296296
@@ -400,7 +400,7 @@ def streamlines(
400400
value can be set in config.defaults['phaseplot.arrow_style'].
401401
rcParams : dict
402402
Override the default parameters used for generating plots.
403-
Default is set by config.default['ctrlplot.rcParams'].
403+
Default is set by config.defaults['ctrlplot.rcParams'].
404404
suppress_warnings : bool, optional
405405
If set to `True`, suppress warning messages in generating trajectories.
406406
@@ -512,7 +512,7 @@ def equilpoints(
512512
----------------
513513
rcParams : dict
514514
Override the default parameters used for generating plots.
515-
Default is set by config.default['ctrlplot.rcParams'].
515+
Default is set by config.defaults['ctrlplot.rcParams'].
516516
517517
"""
518518
# Process keywords
@@ -604,7 +604,7 @@ def separatrices(
604604
----------------
605605
rcParams : dict
606606
Override the default parameters used for generating plots.
607-
Default is set by config.default['ctrlplot.rcParams'].
607+
Default is set by config.defaults['ctrlplot.rcParams'].
608608
suppress_warnings : bool, optional
609609
If set to `True`, suppress warning messages in generating trajectories.
610610

control/pzmap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def pole_zero_plot(
199199
If `True` plot omega-damping grid, if `False` show imaginary axis
200200
for continuous time systems, unit circle for discrete time systems.
201201
If `empty`, do not draw any additonal lines. Default value is set
202-
by config.default['pzmap.grid'] or config.default['rlocus.grid'].
202+
by config.defaults['pzmap.grid'] or config.defaults['rlocus.grid'].
203203
plot : bool, optional
204204
(legacy) If ``True`` a graph is generated with Matplotlib,
205205
otherwise the poles and zeros are only computed and returned.
@@ -259,7 +259,7 @@ def pole_zero_plot(
259259
Set the line width of the markers used for poles and zeros.
260260
rcParams : dict
261261
Override the default parameters used for generating plots.
262-
Default is set by config.default['ctrlplot.rcParams'].
262+
Default is set by config.defaults['ctrlplot.rcParams'].
263263
scaling : str or list, optional
264264
Set the type of axis scaling. Can be 'equal' (default), 'auto', or
265265
a list of the form [xmin, xmax, ymin, ymax].

control/rlocus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def root_locus_plot(
119119
If `True` plot omega-damping grid, if `False` show imaginary axis
120120
for continuous time systems, unit circle for discrete time systems.
121121
If `empty`, do not draw any additonal lines. Default value is set
122-
by config.default['rlocus.grid'].
122+
by config.defaults['rlocus.grid'].
123123
initial_gain : float, optional
124124
Mark the point on the root locus diagram corresponding to the
125125
given gain.

control/timeplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def time_response_plot(
138138
default values are set by config.defaults['timeplot.output_props'].
139139
rcParams : dict
140140
Override the default parameters used for generating plots.
141-
Default is set by config.default['ctrlplot.rcParams'].
141+
Default is set by config.defaults['ctrlplot.rcParams'].
142142
relabel : bool, optional
143143
(deprecated) By default, existing figures and axes are relabeled
144144
when new data are added. If set to `False`, just plot new data on

doc/config.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ parameters based on standard configurations:
3131
use_matlab_defaults
3232
use_legacy_defaults
3333

34+
.. Set the current module to be control.config.defaults so that each of
35+
the parameters gets a link of the form control.config.defaults.<param>.
36+
This can be linked from the documentation using a the construct
37+
`config.defaults['param'] <control.config.defaults.param>`.
38+
39+
.. currentmodule:: control.config.defaults
3440

3541
System creation parameters
3642
--------------------------
@@ -329,8 +335,8 @@ Plotting parameters
329335

330336
If wrap_phase is `False`, then the phase will be unwrapped so that it
331337
is continuously increasing or decreasing. If wrap_phase is `True` the
332-
phase will be restricted to the range [-180, 180) (or [:math:`-\\pi`,
333-
:math:`\\pi`) radians). If `wrap_phase` is specified as a float, the
338+
phase will be restricted to the range [-180, 180) (or [:math:`-\pi`,
339+
:math:`\pi`) radians). If `wrap_phase` is specified as a float, the
334340
phase will be offset by 360 degrees if it falls below the specified
335341
value.
336342

0 commit comments

Comments
 (0)