MCPcopy Create free account
hub / github.com/alceal/plotlars / test_e2e_scatter_styled

Function test_e2e_scatter_styled

crates/plotlars-plotly/src/ext.rs:294–308  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

292
293 #[test]
294 fn test_e2e_scatter_styled() {
295 let df = df!["x" => [1.0, 2.0, 3.0], "y" => [4.0, 5.0, 6.0]].unwrap();
296 let plot = ScatterPlot::builder()
297 .data(&df)
298 .x("x")
299 .y("y")
300 .opacity(0.7)
301 .size(12)
302 .color(Rgb(255, 0, 0))
303 .build();
304 let json = to_json_value(&plot);
305 let marker = &json["traces"][0]["marker"];
306 assert_eq!(marker["opacity"], 0.7);
307 assert_eq!(marker["size"], 12);
308 }
309
310 #[test]
311 fn test_e2e_scatter_grouped() {

Callers

nothing calls this directly

Calls 6

RgbClass · 0.85
to_json_valueFunction · 0.85
colorMethod · 0.80
sizeMethod · 0.80
yMethod · 0.45
xMethod · 0.45

Tested by

no test coverage detected