Struct Plot

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

represents a particular plot

Implementations§

Source§

impl Plot

Source

pub fn text(&mut self, txt: &str) -> &mut Self

add a paragrath of text below a plot.

Source

pub fn html(&mut self, txt: &str) -> &mut Self

add a paragrath of HTML below a plot.

Source

pub fn size(&mut self, width: u32, height: u32) -> &mut Self

the size in pixels (width,height) of the plot area

Source

pub fn xaxis<'a>(&'a mut self) -> Axis<'a>

x axis object

Source

pub fn yaxis<'a>(&'a mut self) -> Axis<'a>

y axis object

Source

pub fn yaxis2<'a>(&'a mut self) -> Axis<'a>

second y axis object

Source

pub fn points<T>(&self, label: &str, data: T) -> &mut Series
where T: IntoIterator<Item = (f64, f64)>,

create a data series with individual points. The data is anything that converts to an iterator of (f64,f64) tuples. If label is the empty string, don’t show in legend

Source

pub fn lines<T>(&self, label: &str, data: T) -> &mut Series
where T: IntoIterator<Item = (f64, f64)>,

create a data series joined with lines.

Source

pub fn bars<T>(&self, label: &str, data: T) -> &mut Series
where T: IntoIterator<Item = (f64, f64)>,

create a data series with bars (histogram).

Source

pub fn legend_pos(&mut self, pos: Corner) -> &mut Self

position of legend (Corner::None to hide)

Source

pub fn legend<'a>(&'a mut self) -> Legend<'a>

legend object

Source

pub fn grid<'a>(&'a mut self) -> Grid<'a>

grid object

Source

pub fn extra_symbols(&mut self) -> &mut Self

Source

pub fn markings<'a>(&'a mut self) -> Markings<'a>

object to create markings like lines and areas

Source

pub fn set_option( &mut self, key: &str, subkey: &str, val: JsonValue, ) -> &mut Self

set any option field not exposed in this API.

Auto Trait Implementations§

§

impl !Freeze for Plot

§

impl !RefUnwindSafe for Plot

§

impl Send for Plot

§

impl !Sync for Plot

§

impl Unpin for Plot

§

impl UnwindSafe for Plot

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