MCPcopy Index your code
hub / github.com/plotly/plotly.py / test_scatter

Function test_scatter

tests/test_optional/test_px/test_px.py:12–19  ·  view source on GitHub ↗
(backend)

Source from the content-addressed store, hash-verified

10
11
12def test_scatter(backend):
13 iris = nw.from_native(px.data.iris(return_type=backend))
14 fig = px.scatter(iris.to_native(), x="sepal_width", y="sepal_length")
15 assert fig.data[0].type == "scatter"
16 assert np.all(fig.data[0].x == iris.get_column("sepal_width").to_numpy())
17 assert np.all(fig.data[0].y == iris.get_column("sepal_length").to_numpy())
18 # test defaults
19 assert fig.data[0].mode == "markers"
20
21
22def test_custom_data_scatter(backend):

Callers

nothing calls this directly

Calls 1

scatterMethod · 0.80

Tested by

no test coverage detected