1use plotlars::{Plot, ScatterMap, Text};
2use polars::prelude::*;
3
4fn main() {
5 let dataset = LazyCsvReader::new(PlPath::new("data/cities.csv"))
6 .finish()
7 .unwrap()
8 .collect()
9 .unwrap();
10
11 ScatterMap::builder()
12 .data(&dataset)
13 .latitude("latitude")
14 .longitude("longitude")
15 .center([48.856613, 2.352222])
16 .zoom(4)
17 .group("city")
18 .opacity(0.5)
19 .size(12)
20 .plot_title(Text::from("Scatter Map").font("Arial").size(18))
21 .legend_title("cities")
22 .build()
23 .plot();
24}