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

Method set_color

src/plots/plot.rs:35–37  ·  view source on GitHub ↗

Set graph color # Example ``` use graplot::Plot; let mut plot = Plot::new([1., 2., 3.]); plot.set_color(0., 0.78, 1.); plot.show(); ```

(&mut self, r: f32, g: f32, b: f32)

Source from the content-addressed store, hash-verified

33 /// plot.show();
34 /// ```
35 pub fn set_color(&mut self, r: f32, g: f32, b: f32) {
36 self.line_desc[0].color = Color::new(r, g, b, 1.);
37 }
38
39 /// Colors the graph at the given index with the color.
40 /// # Example

Callers 1

mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected