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

Method set_label

src/barplot.rs:214–217  ·  view source on GitHub ↗

Sets the name of this bar series in the legend When multiple bar groups are drawn (e.g., stacked or grouped bars), each label identifies that group in the legend produced by [`Plot::legend`](crate::Plot::legend).

(&mut self, label: &str)

Source from the content-addressed store, hash-verified

212 /// When multiple bar groups are drawn (e.g., stacked or grouped bars),
213 /// each label identifies that group in the legend produced by [`Plot::legend`](crate::Plot::legend).
214 pub fn set_label(&mut self, label: &str) -> &mut Self {
215 self.label = String::from(label);
216 self
217 }
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 {

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