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

Function lineplot_example

crates/plotlars/examples/plotly_faceting.rs:229–247  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

227}
228
229fn lineplot_example() {
230 let dataset = create_lineplot_dataset();
231
232 let facet_config = FacetConfig::new().highlight_facet(true);
233
234 LinePlot::builder()
235 .data(&dataset)
236 .x("x")
237 .y("sine")
238 .facet("category")
239 .facet_config(&facet_config)
240 .plot_title(Text::from("Sine Wave Patterns by Amplitude Level"))
241 .x_title("x")
242 .y_title("sin(x)")
243 .width(2.5)
244 .color(Rgb(255, 69, 0))
245 .build()
246 .plot();
247}
248
249fn create_lineplot_dataset() -> DataFrame {
250 let x_values: Vec<f64> = (0..200)

Callers 1

mainFunction · 0.85

Calls 8

create_lineplot_datasetFunction · 0.85
RgbClass · 0.85
highlight_facetMethod · 0.80
colorMethod · 0.80
plotMethod · 0.45
widthMethod · 0.45
yMethod · 0.45
xMethod · 0.45

Tested by

no test coverage detected