0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-14 11:41:49 +02:00

feat(figure): changes to support direct plot functionality

This commit is contained in:
2024-05-24 10:03:40 +02:00
parent a47a8ec413
commit fc4d0f3bb2
9 changed files with 72 additions and 37 deletions

View File

@ -304,6 +304,18 @@ def test_set_custom_curve_data(bec_figure, qtbot):
assert np.array_equal(y_new, [7, 8, 9])
def test_custom_data_2D_array(bec_figure, qtbot):
data = np.random.rand(10, 2)
plt = bec_figure.plot(data)
x, y = plt.curves[0].get_data()
assert np.array_equal(x, data[:, 0])
assert np.array_equal(y, data[:, 1])
def test_get_all_data(bec_figure):
w1 = bec_figure.add_plot()