MCPcopy Create free account
hub / github.com/cpmech/plotpy / set_colors

Method set_colors

src/barplot.rs:220–223  ·  view source on GitHub ↗

Sets the colors for each bar (one color per bar, matched by index)

(&mut self, colors: &[&str])

Source from the content-addressed store, hash-verified

218
219 /// Sets the colors for each bar (one color per bar, matched by index)
220 pub fn set_colors(&mut self, colors: &[&str]) -> &mut Self {
221 self.colors = colors.iter().map(|color| color.to_string()).collect();
222 self
223 }
224
225 /// Sets the width of each bar (relative to the default unit spacing)
226 pub fn set_width(&mut self, width: f64) -> &mut Self {

Callers 2

draw_works_2Function · 0.45
draw_with_str_works_2Function · 0.45

Calls

no outgoing calls

Tested by 2

draw_works_2Function · 0.36
draw_with_str_works_2Function · 0.36