pub struct Figure { /* private fields */ }
Expand description
Plot container
Implementations§
Source§impl Figure
impl Figure
Sourcepub fn box_width(&mut self, width: f64) -> &mut Figure
pub fn box_width(&mut self, width: f64) -> &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
Sourcepub fn output<S>(&mut self, output: S) -> &mut Figure
pub fn output<S>(&mut self, output: S) -> &mut Figure
Changes the output file
Note The default output file is output.plot
Sourcepub fn figure_size(&mut self, width: usize, height: usize) -> &mut Figure
pub fn figure_size(&mut self, width: usize, height: usize) -> &mut Figure
Changes the figure size
Sourcepub fn terminal(&mut self, terminal: Terminal) -> &mut Figure
pub fn terminal(&mut self, terminal: Terminal) -> &mut Figure
Changes the output terminal
Note By default, the terminal is set to Svg
Sourcepub fn draw(&mut self) -> Result<Child>
pub fn draw(&mut self) -> Result<Child>
Spawns a drawing child process
NOTE: stderr, stdin, and stdout are piped
Sourcepub fn dump<W>(&mut self, sink: &mut W) -> Result<&mut Figure>where
W: Write,
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
Sourcepub fn save(&self, path: &Path) -> Result<&Figure>
pub fn save(&self, path: &Path) -> Result<&Figure>
Saves the script required to produce the figure to path
Sourcepub fn configure_axis<F: FnOnce(&mut AxisProperties) -> &mut AxisProperties>(
&mut self,
axis: Axis,
configure: F,
) -> &mut Figure
pub fn configure_axis<F: FnOnce(&mut AxisProperties) -> &mut AxisProperties>( &mut self, axis: Axis, configure: F, ) -> &mut Figure
Configures an axis.
Sourcepub fn configure_key<F: FnOnce(&mut KeyProperties) -> &mut KeyProperties>(
&mut self,
configure: F,
) -> &mut Figure
pub fn configure_key<F: FnOnce(&mut KeyProperties) -> &mut KeyProperties>( &mut self, configure: F, ) -> &mut Figure
Configures the key (legend).
Trait Implementations§
Source§impl<X, WM, BM, BH, WH> Plot<Candlesticks<X, WM, BM, BH, WH>> for Figurewhere
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,
impl<X, WM, BM, BH, WH> Plot<Candlesticks<X, WM, BM, BH, WH>> for Figurewhere
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
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
fn plot<F>( &mut self, candlesticks: Candlesticks<X, WM, BM, BH, WH>, configure: F, ) -> &mut Figure
Plots some
data
with some configuration
Source§impl<X, Y> Plot<Curve<X, Y>> for Figure
impl<X, Y> Plot<Curve<X, Y>> for Figure
Source§type Properties = Properties
type Properties = Properties
The properties associated to the plot
Source§impl<X, Y, L, H> Plot<ErrorBar<X, Y, L, H>> for Figurewhere
H: IntoIterator,
H::Item: Data,
L: IntoIterator,
L::Item: Data,
X: IntoIterator,
X::Item: Data,
Y: IntoIterator,
Y::Item: Data,
impl<X, Y, L, H> Plot<ErrorBar<X, Y, L, H>> for Figurewhere
H: IntoIterator,
H::Item: Data,
L: IntoIterator,
L::Item: Data,
X: IntoIterator,
X::Item: Data,
Y: IntoIterator,
Y::Item: Data,
Source§type Properties = Properties
type Properties = Properties
The properties associated to the plot
Source§impl<X, Y1, Y2> Plot<FilledCurve<X, Y1, Y2>> for Figurewhere
X: IntoIterator,
X::Item: Data,
Y1: IntoIterator,
Y1::Item: Data,
Y2: IntoIterator,
Y2::Item: Data,
impl<X, Y1, Y2> Plot<FilledCurve<X, Y1, Y2>> for Figurewhere
X: IntoIterator,
X::Item: Data,
Y1: IntoIterator,
Y1::Item: Data,
Y2: IntoIterator,
Y2::Item: Data,
Source§type Properties = Properties
type Properties = Properties
The properties associated to the plot
Source§fn plot<F>(&mut self, fc: FilledCurve<X, Y1, Y2>, configure: F) -> &mut Figure
fn plot<F>(&mut self, fc: FilledCurve<X, Y1, Y2>, configure: F) -> &mut Figure
Plots some
data
with some configuration
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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