File tree Expand file tree Collapse file tree 2 files changed +18
-11
lines changed
Expand file tree Collapse file tree 2 files changed +18
-11
lines changed Original file line number Diff line number Diff line change 1+ /*!
2+
3+ Plot arbitrary functions
4+
5+ # Examples
6+
7+ ```
8+ # use plotlib::function::Function;
9+ # use plotlib::view::View;
10+ // y=x^2 between 0 and 10
11+ let f = Function::new(|x| x*x, 0., 10.);
12+ let v = View::new().add(&f);
13+ ```
14+ */
15+
116use std:: f64;
217
318use svg;
419
520use axis;
621use representation:: Representation ;
7-
822use svg_render;
923
1024#[ derive( Debug ) ]
@@ -115,13 +129,3 @@ impl Representation for Function {
115129 "" . into ( )
116130 }
117131}
118-
119- #[ cfg( test) ]
120- mod tests {
121- use super :: * ;
122-
123- #[ test]
124- fn test_function ( ) {
125- let f = Function :: new ( |x| x* x, 0. , 10. ) ;
126- }
127- }
Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ use svg_render;
2828use text_render;
2929use representation:: Representation ;
3030
31+ /**
32+ A one-dimensional histogram with equal binning.
33+ */
3134#[ derive( Debug ) ]
3235pub struct Histogram {
3336 pub bin_bounds : Vec < f64 > , // will have N_bins + 1 entries
You can’t perform that action at this time.
0 commit comments