()
| 531 | } |
| 532 | |
| 533 | fn timeseriesplot_example() { |
| 534 | let dataset = CsvReader::new("data/financial_timeseries.csv") |
| 535 | .finish() |
| 536 | .unwrap(); |
| 537 | |
| 538 | let facet_config = FacetConfig::new() |
| 539 | .highlight_facet(true) |
| 540 | .unhighlighted_color(Rgb(220, 220, 220)); |
| 541 | |
| 542 | TimeSeriesPlot::builder() |
| 543 | .data(&dataset) |
| 544 | .x("date") |
| 545 | .y("revenue") |
| 546 | .additional_series(vec!["costs"]) |
| 547 | .facet("region") |
| 548 | .facet_config(&facet_config) |
| 549 | .plot_title(Text::from("Regional Financial Metrics")) |
| 550 | .x_title("Month") |
| 551 | .y_title("Amount ($)") |
| 552 | .legend_title("Metric") |
| 553 | .width(2.0) |
| 554 | .colors(vec![Rgb(255, 105, 180), Rgb(30, 144, 255)]) |
| 555 | .lines(vec![Line::Solid, Line::Dash]) |
| 556 | .build() |
| 557 | .plot(); |
| 558 | } |
| 559 | |
| 560 | fn surfaceplot_example() { |
| 561 | let n: usize = 50; |
no test coverage detected