pub struct Bar {
    pub bars: Vec<BarDesc>,
    pub ys: Vec<f64>,
    pub axis_desc: AxisDesc,
    pub desc: Desc,
}
Expand description
use graplot::Bar;
 
let mut bar = Bar::new(["Ferris", "Stefan", "Test"], &[100., 200., 700.]);
bar.set_title("title");
bar.set_xlabel("test");
bar.show();

Fields

bars: Vec<BarDesc>ys: Vec<f64>axis_desc: AxisDescdesc: Desc

Implementations

Colors the bar at the given index with the color.

use graplot::{Bar, Color};
 
let mut bar = Bar::new(["Red", "Green", "Blue"], &[200., 220., 250.]);
bar.color(0, Color::new(1., 0., 0., 1.,));
bar.color(2, Color::new(0., 0., 1., 1.,));
bar.show();

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.