[][src]Struct ploteria::Figure

pub struct Figure { /* fields omitted */ }

Plot container

Implementations

impl Figure[src]

pub fn new() -> Figure[src]

Creates an empty figure

pub fn box_width(&mut self, width: f64) -> &mut Figure[src]

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

pub fn font<S>(&mut self, font: S) -> &mut Figure where
    S: Into<Cow<'static, str>>, 
[src]

Changes the font

pub fn font_size(&mut self, size: f64) -> &mut Figure[src]

Changes the size of the font

Panics

Panics if size is a non-positive value

pub fn output<S>(&mut self, output: S) -> &mut Figure where
    S: Into<Cow<'static, Path>>, 
[src]

Changes the output file

Note The default output file is output.plot

pub fn figure_size(&mut self, width: usize, height: usize) -> &mut Figure[src]

Changes the figure size

pub fn terminal(&mut self, terminal: Terminal) -> &mut Figure[src]

Changes the output terminal

Note By default, the terminal is set to Svg

pub fn title<S>(&mut self, title: S) -> &mut Figure where
    S: Into<Cow<'static, str>>, 
[src]

Sets the title

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

Spawns a drawing child process

NOTE: stderr, stdin, and stdout are piped

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

Dumps the script required to produce the figure into sink

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

Saves the script required to produce the figure to path

pub fn configure_axis<F: FnOnce(&mut AxisProperties) -> &mut AxisProperties>(
    &mut self,
    axis: Axis,
    configure: F
) -> &mut Figure
[src]

Configures an axis.

pub fn configure_key<F: FnOnce(&mut KeyProperties) -> &mut KeyProperties>(
    &mut self,
    configure: F
) -> &mut Figure
[src]

Configures the key (legend).

Trait Implementations

impl Clone for Figure[src]

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
[src]

type Properties = Properties

The properties associated to the plot

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

type Properties = Properties

The properties associated to the plot

impl<X, Y, L, H> Plot<ErrorBar<X, Y, L, H>> for Figure where
    H: IntoIterator,
    H::Item: Data,
    L: IntoIterator,
    L::Item: Data,
    X: IntoIterator,
    X::Item: Data,
    Y: IntoIterator,
    Y::Item: Data
[src]

type Properties = Properties

The properties associated to the plot

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
[src]

type Properties = Properties

The properties associated to the plot

Auto Trait Implementations

impl RefUnwindSafe for Figure

impl Send for Figure

impl Sync for Figure

impl Unpin for Figure

impl UnwindSafe for Figure

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.