@@ -79,11 +79,13 @@ class PoleZeroData:
7979 System name.
8080 sys : StateSpace or TransferFunction
8181 System corresponding to the data.
82+ sort_loci : bool, optional
83+ Set to False to turn off sorting of loci into unique branches.
8284
8385 """
8486 def __init__ (
8587 self , poles , zeros , gains = None , loci = None , dt = None , sysname = None ,
86- sys = None ):
88+ sys = None , sort_loci = True ):
8789 """Create a pole/zero map object.
8890
8991 Parameters
@@ -102,10 +104,14 @@ def __init__(
102104 System corresponding to the data.
103105
104106 """
107+ from .rlocus import _RLSortRoots
105108 self .poles = poles
106109 self .zeros = zeros
107110 self .gains = gains
108- self .loci = loci
111+ if loci is not None and sort_loci :
112+ self .loci = _RLSortRoots (loci )
113+ else :
114+ self .loci = loci
109115 self .dt = dt
110116 self .sysname = sysname
111117 self .sys = sys
@@ -187,7 +193,7 @@ def pole_zero_plot(
187193 ----------
188194 data : List of PoleZeroData objects or LTI systems
189195 List of pole/zero response data objects generated by pzmap_response()
190- or rootlocus_response () that are to be plotted. If a list of systems
196+ or root_locus_map () that are to be plotted. If a list of systems
191197 is given, the poles and zeros of those systems will be plotted.
192198 grid : bool or str, optional
193199 If `True` plot omega-damping grid, if `False` show imaginary axis
0 commit comments