def _set_widget_value(self, new_value):
x, y, name = self.get_xy_data(new_value)
if x is not None:
if not np.isreal(y).all():
self.curve.setData(x, self._magnitude(y))
self.curve_phase.setData(x, self._phase(y))
self.plot_item_phase.show()
self.plot_item.setTitle(name + " - Magnitude (dB)")
else:
self.curve.setData(x, np.real(y))
self.plot_item_phase.hide()
self.plot_item.setTitle(name)
评论列表
文章目录