diff --git a/bec_widgets/cli/client.py b/bec_widgets/cli/client.py index f146bc6f..bb532532 100644 --- a/bec_widgets/cli/client.py +++ b/bec_widgets/cli/client.py @@ -1844,6 +1844,7 @@ class BECWaveformWidget(RPCBase): @rpc_call def plot( self, + arg1: "list | np.ndarray | str | None" = None, x: "list | np.ndarray | None" = None, y: "list | np.ndarray | None" = None, x_name: "str | None" = None, @@ -1862,6 +1863,7 @@ class BECWaveformWidget(RPCBase): """ Plot a curve to the plot widget. Args: + arg1(list | np.ndarray | str | None): First argument which can be x data(list | np.ndarray), y data(list | np.ndarray), or y_name(str). x(list | np.ndarray): Custom x data to plot. y(list | np.ndarray): Custom y data to plot. x_name(str): The name of the device for the x-axis. diff --git a/bec_widgets/widgets/waveform/waveform_widget.py b/bec_widgets/widgets/waveform/waveform_widget.py index 10cf9fa6..dc573e1e 100644 --- a/bec_widgets/widgets/waveform/waveform_widget.py +++ b/bec_widgets/widgets/waveform/waveform_widget.py @@ -204,6 +204,7 @@ class BECWaveformWidget(BECWidget, QWidget): @SafeSlot(popup_error=True) def plot( self, + arg1: list | np.ndarray | str | None = None, x: list | np.ndarray | None = None, y: list | np.ndarray | None = None, x_name: str | None = None, @@ -222,6 +223,7 @@ class BECWaveformWidget(BECWidget, QWidget): """ Plot a curve to the plot widget. Args: + arg1(list | np.ndarray | str | None): First argument which can be x data(list | np.ndarray), y data(list | np.ndarray), or y_name(str). x(list | np.ndarray): Custom x data to plot. y(list | np.ndarray): Custom y data to plot. x_name(str): The name of the device for the x-axis. @@ -241,6 +243,7 @@ class BECWaveformWidget(BECWidget, QWidget): """ # self._check_if_scans_have_same_x(enabled=True, x_name_to_check=x_name) return self.waveform.plot( + arg1=arg1, x=x, y=y, x_name=x_name, diff --git a/tests/unit_tests/test_waveform_widget.py b/tests/unit_tests/test_waveform_widget.py index 44185545..3b72164e 100644 --- a/tests/unit_tests/test_waveform_widget.py +++ b/tests/unit_tests/test_waveform_widget.py @@ -54,6 +54,7 @@ def test_waveform_widget_set_x(waveform_widget, mock_waveform): def test_waveform_plot_data(waveform_widget, mock_waveform): waveform_widget.plot(x=[1, 2, 3], y=[1, 2, 3]) waveform_widget.waveform.plot.assert_called_once_with( + arg1=None, x=[1, 2, 3], y=[1, 2, 3], x_name=None, @@ -73,6 +74,7 @@ def test_waveform_plot_data(waveform_widget, mock_waveform): def test_waveform_plot_scan_curves(waveform_widget, mock_waveform): waveform_widget.plot(x_name="samx", y_name="samy", dap="GaussianModel") waveform_widget.waveform.plot.assert_called_once_with( + arg1=None, x=None, y=None, x_name="samx",