Skip to content

Commit 4adc489

Browse files
committed
Adapt letter_counter.rs to work with latest master
1 parent 1895900 commit 4adc489

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

examples/letter_counter.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use std::collections::btree_map::BTreeMap;
2-
use plotlib::style::BarChart;
2+
use plotlib::style::BoxStyle;
33

44
fn main() {
55
let mut data = Vec::new();
@@ -16,11 +16,11 @@ fn main() {
1616
for (ch, count) in &count {
1717
println!("{:?}: {}", ch, count);
1818
let count = *count as f64;
19-
data.push(plotlib::barchart::BarChart::new(count).label(ch.to_string()));
19+
data.push(plotlib::repr::BarChart::new(count).label(ch.to_string()));
2020
}
2121
// Add data to the view
2222
let v = data
23-
.iter()
23+
.into_iter()
2424
.fold(plotlib::view::CategoricalView::new(), |view, datum| {
2525
view.add(datum)
2626
});

0 commit comments

Comments
 (0)