@@ -78,6 +78,8 @@ class FrequencyResponseData(LTI):
78
78
corresponding to the frequency points in omega
79
79
w : iterable of real frequencies
80
80
List of frequency points for which data are available.
81
+ sysname : str or None
82
+ Name of the system that generated the data.
81
83
smooth : bool, optional
82
84
If ``True``, create an interpolation function that allows the
83
85
frequency response to be computed at any frequency within the range of
@@ -204,6 +206,10 @@ def __init__(self, *args, **kwargs):
204
206
#
205
207
# Process key word arguments
206
208
#
209
+
210
+ # If data was generated by a system, keep track of that
211
+ self .sysname = kwargs .pop ('sysname' , None )
212
+
207
213
# Keep track of return type
208
214
self .return_magphase = kwargs .pop ('return_magphase' , False )
209
215
if self .return_magphase not in (True , False ):
@@ -638,6 +644,14 @@ def feedback(self, other=1, sign=-1):
638
644
639
645
return FRD (fresp , other .omega , smooth = (self .ifunc is not None ))
640
646
647
+ # Plotting interface
648
+ def plot (self , * args , ** kwargs ):
649
+ from .freqplot import bode_plot
650
+
651
+ # For now, only support Bode plots
652
+ # TODO: add 'kind' keyword and Nyquist plots (?)
653
+ bode_plot (self , * args , ** kwargs )
654
+
641
655
# Convert to pandas
642
656
def to_pandas (self ):
643
657
if not pandas_check ():
0 commit comments