Skip to content

Commit c70fbeb

Browse files
bnavigatorlaurensvalk
authored andcommitted
add matplotlib to intersphinx
1 parent c13cc80 commit c70fbeb

File tree

7 files changed

+25
-19
lines changed

7 files changed

+25
-19
lines changed

control/freqplot.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ def bode_plot(syslist, omega=None,
110110
config.defaults['freqplot.number_of_samples'].
111111
margins : bool
112112
If True, plot gain and phase margin.
113-
*args : `matplotlib` plot positional properties, optional
113+
*args : :func:`matplotlib.pyplot.plot` positional properties, optional
114114
Additional arguments for `matplotlib` plots (color, linestyle, etc)
115-
**kwargs : `matplotlib` plot keyword properties, optional
115+
**kwargs : :func:`matplotlib.pyplot.plot` keyword properties, optional
116116
Additional keywords (passed to `matplotlib`)
117117
118118
Returns
@@ -465,9 +465,9 @@ def nyquist_plot(syslist, omega=None, plot=True, label_freq=0,
465465
Label every nth frequency on the plot
466466
arrowhead_width : arrow head width
467467
arrowhead_length : arrow head length
468-
*args : `matplotlib` plot positional properties, optional
468+
*args : :func:`matplotlib.pyplot.plot` positional properties, optional
469469
Additional arguments for `matplotlib` plots (color, linestyle, etc)
470-
**kwargs : `matplotlib` plot keyword properties, optional
470+
**kwargs : :func:`matplotlib.pyplot.plot` keyword properties, optional
471471
Additional keywords (passed to `matplotlib`)
472472
473473
Returns
@@ -602,7 +602,7 @@ def gangof4_plot(P, C, omega=None, **kwargs):
602602
Linear input/output systems (process and control)
603603
omega : array
604604
Range of frequencies (list or bounds) in rad/sec
605-
**kwargs : `matplotlib` plot keyword properties, optional
605+
**kwargs : :func:`matplotlib.pyplot.plot` keyword properties, optional
606606
Additional keywords (passed to `matplotlib`)
607607
608608
Returns

control/nichols.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,9 @@ def nichols_grid(cl_mags=None, cl_phases=None, line_style='dotted'):
135135
Array of closed-loop phases defining the iso-phase lines on a custom
136136
Nichols chart. Must be in the range -360 < cl_phases < 0
137137
line_style : string, optional
138-
.. seealso:: https://matplotlib.org/gallery/lines_bars_and_markers/linestyles.html
138+
:doc:`Matplotlib linestyle \
139+
<matplotlib:gallery/lines_bars_and_markers/linestyles>`
139140
140-
Returns
141-
-------
142-
None
143141
"""
144142
# Default chart size
145143
ol_phase_min = -359.99

control/pzmap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def pzmap(sys, plot=True, grid=False, title='Pole Zero Map', **kwargs):
6666
----------
6767
sys: LTI (StateSpace or TransferFunction)
6868
Linear system for which poles and zeros are computed.
69-
plot: bool
69+
plot: bool, optional
7070
If ``True`` a graph is generated with Matplotlib,
7171
otherwise the poles and zeros are only computed and returned.
7272
grid: boolean (default = False)

control/rlocus.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575

7676
# Main function: compute a root locus diagram
7777
def root_locus(sys, kvect=None, xlim=None, ylim=None,
78-
plotstr=None, plot=True, print_gain=None, grid=None, ax=None,
78+
plotstr=None, plot=True, print_gain=None, grid=None, ax=None,
7979
**kwargs):
8080

8181
"""Root locus plot
@@ -91,18 +91,22 @@ def root_locus(sys, kvect=None, xlim=None, ylim=None,
9191
kvect : list or ndarray, optional
9292
List of gains to use in computing diagram.
9393
xlim : tuple or list, optional
94-
Set limits of x axis, normally with tuple (see matplotlib.axes).
94+
Set limits of x axis, normally with tuple
95+
(see :doc:`matplotlib:api/axes_api`).
9596
ylim : tuple or list, optional
96-
Set limits of y axis, normally with tuple (see matplotlib.axes).
97+
Set limits of y axis, normally with tuple
98+
(see :doc:`matplotlib:api/axes_api`).
99+
plotstr : :func:`matplotlib.pyplot.plot` format string, optional
100+
plotting style specification
97101
plot : boolean, optional
98102
If True (default), plot root locus diagram.
99103
print_gain : bool
100104
If True (default), report mouse clicks when close to the root locus
101105
branches, calculate gain, damping and print.
102106
grid : bool
103107
If True plot omega-damping grid. Default is False.
104-
ax : Matplotlib axis
105-
axis on which to create root locus plot
108+
ax : :class:`matplotlib.axes.Axes`
109+
Axes on which to create root locus plot
106110
107111
Returns
108112
-------
@@ -160,7 +164,7 @@ def root_locus(sys, kvect=None, xlim=None, ylim=None,
160164
fig = kwargs['fig']
161165
ax = fig.axes[1]
162166
else:
163-
if ax is None:
167+
if ax is None:
164168
ax = plt.gca()
165169
fig = ax.figure
166170
ax.set_title('Root Locus')

control/sisotool.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ def sisotool(sys, kvect = None, xlim_rlocus = None, ylim_rlocus = None,
2626
kvect : list or ndarray, optional
2727
List of gains to use for plotting root locus
2828
xlim_rlocus : tuple or list, optional
29-
control of x-axis range, normally with tuple (see matplotlib.axes)
29+
control of x-axis range, normally with tuple
30+
(see :doc:`matplotlib:api/axes_api`).
3031
ylim_rlocus : tuple or list, optional
3132
control of y-axis range
32-
plotstr_rlocus : Additional options to matplotlib
33+
plotstr_rlocus : :func:`matplotlib.pyplot.plot` format string, optional
3334
plotting style for the root locus plot(color, linestyle, etc)
3435
rlocus_grid: boolean (default = False)
3536
If True plot s-plane grid.

doc/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@
9999
# should be linked to in this documentation.
100100
intersphinx_mapping = \
101101
{'scipy': ('https://docs.scipy.org/doc/scipy/reference', None),
102-
'numpy': ('https://docs.scipy.org/doc/numpy', None)}
102+
'numpy': ('https://numpy.org/doc/stable', None),
103+
'matplotlib': ('https://matplotlib.org/', None),
104+
}
103105

104106
# If this is True, todo and todolist produce output, else they produce nothing.
105107
# The default is False.

doc/control.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Frequency domain plotting
4545
nyquist_plot
4646
gangof4_plot
4747
nichols_plot
48+
nichols_grid
4849

4950
Note: For plotting commands that create multiple axes on the same plot, the
5051
individual axes can be retrieved using the axes label (retrieved using the

0 commit comments

Comments
 (0)