MCPcopy Index your code
hub / github.com/cpmech/plotpy / draw_mat

Method draw_mat

src/boxplot.rs:159–170  ·  view source on GitHub ↗

Draws the box plot given a 2D matrix of values Each **column** of the matrix produces one box. All groups must have the same number of rows (unlike [`draw`](Self::draw) which allows variable sizes). # Input `data` -- a 2D matrix (rows = observations, columns = groups)

(&mut self, data: &'a T)

Source from the content-addressed store, hash-verified

157 ///
158 /// * `data` -- a 2D matrix (rows = observations, columns = groups)
159 pub fn draw_mat<'a, T, U>(&mut self, data: &'a T)
160 where
161 T: AsMatrix<'a, U>,
162 U: 'a + std::fmt::Display + Num,
163 {
164 matrix_to_array(&mut self.buffer, "x", data);
165 if self.positions.len() > 0 {
166 generate_list(&mut self.buffer, "positions", self.positions.as_slice());
167 }
168 let opt = self.options();
169 write!(&mut self.buffer, "p=plt.boxplot(x{})\n", &opt).unwrap();
170 }
171
172 /// Sets the [marker symbol](https://matplotlib.org/stable/api/markers_api.html) for outlier points (fliers)
173 ///

Callers 4

draw_mat_works_1Function · 0.80
draw_mat_works_2Function · 0.80
test_boxplot_1Function · 0.80
test_boxplot_3Function · 0.80

Calls 3

matrix_to_arrayFunction · 0.85
generate_listFunction · 0.85
optionsMethod · 0.45

Tested by 4

draw_mat_works_1Function · 0.64
draw_mat_works_2Function · 0.64
test_boxplot_1Function · 0.64
test_boxplot_3Function · 0.64