MCPcopy Create free account
hub / github.com/elftausend/graplot / color

Method color

src/plots/plot.rs:49–51  ·  view source on GitHub ↗

Colors the graph at the given index with the color. # Example ``` use graplot::{Plot, BLUE}; let mut plot = Plot::new([1., 2., 3.,]); plot.add([2., 3., 4.,]); plot.color(1, BLUE); plot.show(); ```

(&mut self, idx: usize, color: Color)

Source from the content-addressed store, hash-verified

47 /// plot.show();
48 /// ```
49 pub fn color(&mut self, idx: usize, color: Color) {
50 self.line_desc[idx].color = color;
51 }
52
53 /// adds a new graph / plot to the original plot.
54 pub fn add<A: PlotArg>(&mut self, args: A) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected