()
| 227 | } |
| 228 | |
| 229 | fn 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 | |
| 249 | fn create_lineplot_dataset() -> DataFrame { |
| 250 | let x_values: Vec<f64> = (0..200) |
no test coverage detected