plotlars 0.12.0

Plotlars is a Rust library designed to facilitate the integration between the Polars data analysis library and visualization libraries.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use plotlars::{Axis, CsvReader, OhlcPlot, Plot};

fn main() {
    let stock_data = CsvReader::new("data/stock_prices.csv").finish().unwrap();

    OhlcPlot::builder()
        .data(&stock_data)
        .dates("date")
        .open("open")
        .high("high")
        .low("low")
        .close("close")
        .plot_title("OHLC Plot")
        .y_title("price ($)")
        .y_axis(&Axis::new().show_axis(true))
        .build()
        .plot();
}