Struct criterion::criterion_plot::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

§

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)

§

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,

§

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,

§

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

§

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,

§

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

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

§

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>,

§

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>,

§

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.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more