Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if kind == 'nyquist':
if ax is None:
fig, ax = plt.subplots(figsize=(5, 5))
if Z_data is not None:
ax = plot_nyquist(ax, Z_data, ls='', marker='s', **kwargs)
if self._is_fit():
if f_data is not None:
f_pred = f_data
else:
f_pred = np.logspace(5, -3)
Z_fit = self.predict(f_pred)
ax = plot_nyquist(ax, Z_fit, ls='-', marker='', **kwargs)
return ax
elif kind == 'bode':
if ax is None:
fig, ax = plt.subplots(nrows=2, figsize=(5, 5))
if Z_data is not None:
ax = plot_bode(ax, f_data, Z_data, ls='', marker='s', **kwargs)
if self._is_fit():
if f_data is not None:
f_pred = f_data
else:
f_pred = np.logspace(5, -3)
Z_fit = self.predict(f_pred)
ax = plot_bode(ax, f_pred, Z_fit, ls='-', marker='', **kwargs)
`matplotlib.pyplot.Line2D` properties like linewidth,
line color, marker color, and labels.
If kind is 'altair', used to specify nyquist height as `size`
Returns
-------
ax: matplotlib.axes
axes of the created nyquist plot
"""
if kind == 'nyquist':
if ax is None:
fig, ax = plt.subplots(figsize=(5, 5))
if Z_data is not None:
ax = plot_nyquist(ax, Z_data, ls='', marker='s', **kwargs)
if self._is_fit():
if f_data is not None:
f_pred = f_data
else:
f_pred = np.logspace(5, -3)
Z_fit = self.predict(f_pred)
ax = plot_nyquist(ax, Z_fit, ls='-', marker='', **kwargs)
return ax
elif kind == 'bode':
if ax is None:
fig, ax = plt.subplots(nrows=2, figsize=(5, 5))
if Z_data is not None:
ax = plot_bode(ax, f_data, Z_data, ls='', marker='s', **kwargs)