use crate::artist::ScatterArtist;
use crate::colormap::Colormap;
use crate::primitives::Color;
use crate::theme::Marker;
impl ScatterArtist {
pub fn color(&mut self, color: Color) -> &mut Self {
self.color = color;
self
}
pub fn marker(&mut self, marker: Marker) -> &mut Self {
self.marker = marker;
self
}
pub fn size(&mut self, size: f64) -> &mut Self {
self.size = size;
self
}
pub fn label(&mut self, label: &str) -> &mut Self {
self.label = Some(label.to_string());
self
}
pub fn alpha(&mut self, alpha: f64) -> &mut Self {
self.alpha = alpha.clamp(0.0, 1.0);
self
}
pub fn colors(&mut self, colors: Vec<Color>) -> &mut Self {
self.colors = Some(colors);
self
}
pub fn c(&mut self, c: Vec<f64>) -> &mut Self {
self.c = Some(c);
self
}
pub fn cmap(&mut self, cmap: Colormap) -> &mut Self {
self.cmap = Some(cmap);
self
}
}