Skip to content

Commit 5dd230a

Browse files
committed
Add an example usage to the histogram module
1 parent f0e357f commit 5dd230a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/histogram.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22
33
A module for Histograms
44
5+
# Examples
6+
7+
```
8+
# use plotlib::histogram::Histogram;
9+
// Create some dummy data
10+
let data = vec![0.3, 0.5, 6.4, 5.3, 3.6, 3.6, 3.5, 7.5, 4.0];
11+
12+
// and create a histogram out of it
13+
let h = Histogram::from_vec(&data);
14+
```
15+
516
TODO:
617
718
- frequency or density option

0 commit comments

Comments
 (0)