pub struct Plot {
pub xs: Matrix,
pub ys: Matrix,
pub line_desc: Vec<LineDesc>,
pub axis_desc: AxisDesc,
pub desc: Desc,
}Fields
xs: Matrixys: Matrixline_desc: Vec<LineDesc>axis_desc: AxisDescdesc: DescImplementations
sourceimpl Plot
impl Plot
pub fn new<A: PlotArg>(args: A) -> Plot
pub fn set_desc(&mut self, desc: Desc)
sourcepub fn set_color(&mut self, color: (f32, f32, f32))
pub fn set_color(&mut self, color: (f32, f32, f32))
Set graph color
Example
use graplot::Plot;
let plot = Plot::new([1., 2., 3.]);
plot.set_color(0., 0.78, 1.);
plot.show();pub fn add<A: PlotArg>(&mut self, args: A)
pub fn set_title(&mut self, title: &str)
pub fn set_xlabel(&mut self, label: &str)
pub fn set_ylabel(&mut self, label: &str)
pub fn show(self)
pub fn show_threaded(self) -> JoinHandle<()>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Plot
impl Send for Plot
impl Sync for Plot
impl Unpin for Plot
impl UnwindSafe for Plot
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more