criterion_plot

Struct Figure

Source
pub struct Figure { /* private fields */ }
Expand description

Plot container

Implementations§

Source§

impl Figure

Source

pub fn new() -> Figure

Creates an empty figure

Source

pub fn draw(&mut self) -> Result<Child>

Spawns a drawing child process

NOTE: stderr, stdin, and stdout are piped

Source

pub fn dump<W>(&mut self, sink: &mut W) -> Result<&mut Figure>
where W: Write,

Dumps the script required to produce the figure into sink

Source

pub fn save(&self, path: &Path) -> Result<&Figure>

Saves the script required to produce the figure to path

Trait Implementations§

Source§

impl Clone for Figure

Source§

fn clone(&self) -> Figure

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Configure<Axis> for Figure

Source§

fn configure<F>(&mut self, axis: Axis, configure: F) -> &mut Figure
where F: FnOnce(&mut Properties) -> &mut Properties,

Configures an axis

Source§

type Properties = Properties

The properties of what’s being configured
Source§

impl Configure<Key> for Figure

Source§

fn configure<F>(&mut self, _: Key, configure: F) -> &mut Figure
where F: FnOnce(&mut Properties) -> &mut Properties,

Configures the key (legend)

Source§

type Properties = Properties

The properties of what’s being configured
Source§

impl<X, WM, BM, BH, WH> Plot<Candlesticks<X, WM, BM, BH, WH>> for Figure
where BH: IntoIterator, BH::Item: Data, BM: IntoIterator, BM::Item: Data, WH: IntoIterator, WH::Item: Data, WM: IntoIterator, WM::Item: Data, X: IntoIterator, X::Item: Data,

Source§

type Properties = Properties

The properties associated to the plot
Source§

fn plot<F>( &mut self, candlesticks: Candlesticks<X, WM, BM, BH, WH>, configure: F, ) -> &mut Figure
where F: FnOnce(&mut Properties) -> &mut Properties,

Plots some data with some configuration
Source§

impl<X, Y> Plot<Curve<X, Y>> for Figure
where X: IntoIterator, X::Item: Data, Y: IntoIterator, Y::Item: Data,

Source§

type Properties = Properties

The properties associated to the plot
Source§

fn plot<F>(&mut self, curve: Curve<X, Y>, configure: F) -> &mut Figure
where F: FnOnce(&mut Properties) -> &mut Properties,

Plots some data with some configuration
Source§

impl<X, Y, L, H> Plot<ErrorBar<X, Y, L, H>> for Figure

Source§

type Properties = Properties

The properties associated to the plot
Source§

fn plot<F>(&mut self, e: ErrorBar<X, Y, L, H>, configure: F) -> &mut Figure
where F: FnOnce(&mut Properties) -> &mut Properties,

Plots some data with some configuration
Source§

impl<X, Y1, Y2> Plot<FilledCurve<X, Y1, Y2>> for Figure
where X: IntoIterator, X::Item: Data, Y1: IntoIterator, Y1::Item: Data, Y2: IntoIterator, Y2::Item: Data,

Source§

type Properties = Properties

The properties associated to the plot
Source§

fn plot<F>(&mut self, fc: FilledCurve<X, Y1, Y2>, configure: F) -> &mut Figure
where F: FnOnce(&mut Properties) -> &mut Properties,

Plots some data with some configuration
Source§

impl Set<BoxWidth> for Figure

Source§

fn set(&mut self, width: BoxWidth) -> &mut Figure

Changes the box width of all the box related plots (bars, candlesticks, etc)

Note The default value is 0

§Panics

Panics if width is a negative value

Source§

impl Set<Font> for Figure

Source§

fn set(&mut self, font: Font) -> &mut Figure

Changes the font

Source§

impl Set<FontSize> for Figure

Source§

fn set(&mut self, size: FontSize) -> &mut Figure

Changes the size of the font

§Panics

Panics if size is a non-positive value

Source§

impl Set<Output> for Figure

Source§

fn set(&mut self, output: Output) -> &mut Figure

Changes the output file

Note The default output file is output.plot

Source§

impl Set<Size> for Figure

Source§

fn set(&mut self, size: Size) -> &mut Figure

Changes the figure size

Source§

impl Set<Terminal> for Figure

Source§

fn set(&mut self, terminal: Terminal) -> &mut Figure

Changes the output terminal

Note By default, the terminal is set to Svg

Source§

impl Set<Title> for Figure

Source§

fn set(&mut self, title: Title) -> &mut Figure

Sets the title

Auto Trait Implementations§

§

impl Freeze for Figure

§

impl RefUnwindSafe for Figure

§

impl Send for Figure

§

impl Sync for Figure

§

impl Unpin for Figure

§

impl UnwindSafe for Figure

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.