Skip to content

Commit 29f2e5c

Browse files
committed
add documentation about use of axis('equal') in pzmap, rlocus
1 parent 8356044 commit 29f2e5c

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

control/pzmap.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@
5959
# http://matplotlib.sourceforge.net/examples/axes_grid/demo_axisline_style.html
6060
# http://matplotlib.sourceforge.net/examples/axes_grid/demo_curvelinear_grid.html
6161
def pzmap(sys, plot=None, grid=None, title='Pole Zero Map', **kwargs):
62-
"""
63-
Plot a pole/zero map for a linear system.
62+
"""Plot a pole/zero map for a linear system.
6463
6564
Parameters
6665
----------
@@ -78,6 +77,14 @@ def pzmap(sys, plot=None, grid=None, title='Pole Zero Map', **kwargs):
7877
The systems poles
7978
zeros: array
8079
The system's zeros.
80+
81+
Notes
82+
-----
83+
The pzmap function calls matplotlib.pyplot.axis('equal'), which means
84+
that trying to reset the axis limits may not behave as expected. To
85+
change the axis limits, use matplotlib.pyplot.gca().axis('auto') and
86+
then set the axis limits to the desired values.
87+
8188
"""
8289
# Check to see if legacy 'Plot' keyword was used
8390
if 'Plot' in kwargs:

control/rlocus.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,14 @@ def root_locus(sys, kvect=None, xlim=None, ylim=None,
114114
Computed root locations, given as a 2D array
115115
klist : ndarray or list
116116
Gains used. Same as klist keyword argument if provided.
117+
118+
Notes
119+
-----
120+
The root_locus function calls matplotlib.pyplot.axis('equal'), which
121+
means that trying to reset the axis limits may not behave as expected.
122+
To change the axis limits, use matplotlib.pyplot.gca().axis('auto') and
123+
then set the axis limits to the desired values.
124+
117125
"""
118126
# Check to see if legacy 'Plot' keyword was used
119127
if 'Plot' in kwargs:

0 commit comments

Comments
 (0)