Draws the box plot given a nested list of values Each inner `Vec` produces one box. Groups can have different sizes. # Input `data` -- a sequence of 1D arrays; one box is drawn per sub-array See also: [`draw_mat`](Self::draw_mat) for matrix-oriented data
(&mut self, data: &Vec<Vec<T>>)
| 137 | /// |
| 138 | /// See also: [`draw_mat`](Self::draw_mat) for matrix-oriented data |
| 139 | pub fn draw<T>(&mut self, data: &Vec<Vec<T>>) |
| 140 | where |
| 141 | T: std::fmt::Display + Num, |
| 142 | { |
| 143 | generate_nested_list(&mut self.buffer, "x", data); |
| 144 | if self.positions.len() > 0 { |
| 145 | generate_list(&mut self.buffer, "positions", self.positions.as_slice()); |
| 146 | } |
| 147 | let opt = self.options(); |
| 148 | write!(&mut self.buffer, "p=plt.boxplot(x{})\n", &opt).unwrap(); |
| 149 | } |
| 150 | |
| 151 | /// Draws the box plot given a 2D matrix of values |
| 152 | /// |