pub trait Configurable {
Show 73 methods // Required methods fn configuration_mut(&mut self) -> &mut Configuration; fn configuration(&self) -> &Configuration; // Provided methods fn set_title<S: Display>(&mut self, title: S) -> &mut Self { ... } fn set_logx<N: Into<f64>>(&mut self, logx: N) -> &mut Self { ... } fn set_logy<N: Into<f64>>(&mut self, logy: N) -> &mut Self { ... } fn set_logz<N: Into<f64>>(&mut self, logz: N) -> &mut Self { ... } fn set_xlog<N: Into<f64>>(&mut self, logx: N) -> &mut Self { ... } fn set_ylog<N: Into<f64>>(&mut self, logy: N) -> &mut Self { ... } fn set_zlog<N: Into<f64>>(&mut self, logz: N) -> &mut Self { ... } fn set_labelx<S: Display>(&mut self, labelx: S) -> &mut Self { ... } fn set_labely<S: Display>(&mut self, labely: S) -> &mut Self { ... } fn set_labelz<S: Display>(&mut self, labelz: S) -> &mut Self { ... } fn set_xlabel<S: Display>(&mut self, labelx: S) -> &mut Self { ... } fn set_ylabel<S: Display>(&mut self, labely: S) -> &mut Self { ... } fn set_zlabel<S: Display>(&mut self, labelz: S) -> &mut Self { ... } fn set_rangex<S, T>(&mut self, left: S, right: T) -> &mut Self where f64: From<S> + From<T> { ... } fn set_rangey<S, T>(&mut self, down: S, up: T) -> &mut Self where f64: From<S> + From<T> { ... } fn set_rangez<S, T>(&mut self, down: S, up: T) -> &mut Self where f64: From<S> + From<T> { ... } fn set_xrange<S, T>(&mut self, left: S, right: T) -> &mut Self where f64: From<S> + From<T> { ... } fn set_yrange<S, T>(&mut self, down: S, up: T) -> &mut Self where f64: From<S> + From<T> { ... } fn set_zrange<S, T>(&mut self, down: S, up: T) -> &mut Self where f64: From<S> + From<T> { ... } fn set_data_extension<S: AsRef<OsStr>>(&mut self, extension: S) -> &mut Self { ... } fn set_plot_extension<S: AsRef<OsStr>>(&mut self, extension: S) -> &mut Self { ... } fn set_header(&mut self, header: bool) -> &mut Self { ... } fn set_style<S>( &mut self, style: S ) -> Result<&mut Self, <S as TryInto<Style>>::Error> where S: TryInto<Style> { ... } fn set_dashtype(&mut self, dashtype: usize) -> &mut Self { ... } fn set_date(&mut self, date: DateTime<Local>) -> &mut Self { ... } fn set_id<S: Display>(&mut self, id: S) -> &mut Self { ... } fn set_custom<S: Display, T: Display>( &mut self, key: S, value: T ) -> &mut Self { ... } fn set_ticsx<T, S>(&mut self, ticsx: T) -> &mut Self where T: Into<Option<S>>, S: Display { ... } fn set_ticsy<T, S>(&mut self, ticsy: T) -> &mut Self where T: Into<Option<S>>, S: Display { ... } fn set_ticsz<T, S>(&mut self, ticsz: T) -> &mut Self where T: Into<Option<S>>, S: Display { ... } fn set_xtics<T, S>(&mut self, ticsx: T) -> &mut Self where T: Into<Option<S>>, S: Display { ... } fn set_ytics<T, S>(&mut self, ticsy: T) -> &mut Self where T: Into<Option<S>>, S: Display { ... } fn set_ztics<T, S>(&mut self, ticsz: T) -> &mut Self where T: Into<Option<S>>, S: Display { ... } fn set_pause<T, S>(&mut self, pause: T) -> &mut Self where T: Into<Option<S>>, f64: From<S> { ... } fn title(&self) -> Option<&String> { ... } fn logx(&self) -> Option<f64> { ... } fn logy(&self) -> Option<f64> { ... } fn logz(&self) -> Option<f64> { ... } fn xlog(&self) -> Option<f64> { ... } fn ylog(&self) -> Option<f64> { ... } fn zlog(&self) -> Option<f64> { ... } fn labelx(&self) -> Option<&String> { ... } fn labely(&self) -> Option<&String> { ... } fn labelz(&self) -> Option<&String> { ... } fn xlabel(&self) -> Option<&String> { ... } fn ylabel(&self) -> Option<&String> { ... } fn zlabel(&self) -> Option<&String> { ... } fn rangex(&self) -> Option<(f64, f64)> { ... } fn rangey(&self) -> Option<(f64, f64)> { ... } fn rangez(&self) -> Option<(f64, f64)> { ... } fn xrange(&self) -> Option<(f64, f64)> { ... } fn yrange(&self) -> Option<(f64, f64)> { ... } fn zrange(&self) -> Option<(f64, f64)> { ... } fn plot_extension(&self) -> Option<&OsStr> { ... } fn data_extension(&self) -> Option<&OsStr> { ... } fn plot_path(&self) -> &Path { ... } fn data_path(&self) -> &Path { ... } fn header(&self) -> bool { ... } fn style(&self) -> &Style { ... } fn dashtype(&self) -> Option<usize> { ... } fn date(&self) -> &DateTime<Local> { ... } fn id(&self) -> Option<&String> { ... } fn checked_id(&self) -> &String { ... } fn custom<S: Display>(&self, key: S) -> Option<&String> { ... } fn ticsx(&self) -> Option<&String> { ... } fn ticsy(&self) -> Option<&String> { ... } fn ticsz(&self) -> Option<&String> { ... } fn xtics(&self) -> Option<&String> { ... } fn ytics(&self) -> Option<&String> { ... } fn ztics(&self) -> Option<&String> { ... } fn pause(&self) -> Option<f64> { ... }
}
Expand description

Allows basic saving and plotting configuration.

§Remarks

It is meant to be a black box for all configuration throught the Configuration struct, which is pursposely kept hidden.

§Implementation

See traits module level documentation.

Required Methods§

source

fn configuration_mut(&mut self) -> &mut Configuration

Mutable access to Configuration.

source

fn configuration(&self) -> &Configuration

Reference access to Configuration.

Provided Methods§

source

fn set_title<S: Display>(&mut self, title: S) -> &mut Self

Set title, which in comparisons correspond to legends.

source

fn set_logx<N: Into<f64>>(&mut self, logx: N) -> &mut Self

Set logaritmic scale in the x axis.

§Remark

The x axis that will be ploted should not include zero.

source

fn set_logy<N: Into<f64>>(&mut self, logy: N) -> &mut Self

Set logaritmic scale in the y axis.

§Remark

The y axis that will be ploted should not include zero.

source

fn set_logz<N: Into<f64>>(&mut self, logz: N) -> &mut Self

Set logaritmic scale in the z axis.

§Remark

The z axis that will be ploted should not include zero.

source

fn set_xlog<N: Into<f64>>(&mut self, logx: N) -> &mut Self

Set logaritmic scale in the x axis.

§Remark

The x axis that will be ploted should not include zero. This is a mirror method of logx, for convinience.

source

fn set_ylog<N: Into<f64>>(&mut self, logy: N) -> &mut Self

Set logaritmic scale in the y axis.

§Remark

The y axis that will be ploted should not include zero. This is a mirror method of logy, for convinience.

source

fn set_zlog<N: Into<f64>>(&mut self, logz: N) -> &mut Self

Set logaritmic scale in the z axis.

§Remark

The z axis that will be ploted should not include zero. This is a mirror method of logz, for convinience.

source

fn set_labelx<S: Display>(&mut self, labelx: S) -> &mut Self

Set a label in the x axis.

source

fn set_labely<S: Display>(&mut self, labely: S) -> &mut Self

Set a label in the y axis.

source

fn set_labelz<S: Display>(&mut self, labelz: S) -> &mut Self

Set a label in the z axis.

source

fn set_xlabel<S: Display>(&mut self, labelx: S) -> &mut Self

Set a label in the x axis.

§Remarks

This is a mirror method of labelx, for convinience.

source

fn set_ylabel<S: Display>(&mut self, labely: S) -> &mut Self

Set a label in the y axis.

§Remarks

This is a mirror method of labely, for convinience.

source

fn set_zlabel<S: Display>(&mut self, labelz: S) -> &mut Self

Set a label in the z axis.

§Remarks

This is a mirror method of labelz, for convinience.

source

fn set_rangex<S, T>(&mut self, left: S, right: T) -> &mut Self
where f64: From<S> + From<T>,

Set the range in the x axis. If left > right, then the x axis is inverted.

source

fn set_rangey<S, T>(&mut self, down: S, up: T) -> &mut Self
where f64: From<S> + From<T>,

Set the range in the y axis. If down > up, then the y axis is inverted.

source

fn set_rangez<S, T>(&mut self, down: S, up: T) -> &mut Self
where f64: From<S> + From<T>,

Set the range in the z axis. If down > up, then the z axis is inverted.

source

fn set_xrange<S, T>(&mut self, left: S, right: T) -> &mut Self
where f64: From<S> + From<T>,

Set the range in the x axis. If left > right, then the x axis is inverted.

§Remarks

This is a mirror method of rangex, for convinience.

source

fn set_yrange<S, T>(&mut self, down: S, up: T) -> &mut Self
where f64: From<S> + From<T>,

Set the range in the y axis. If down > up, then the y axis is inverted.

§Remarks

This is a mirror method of rangey, for convinience.

source

fn set_zrange<S, T>(&mut self, down: S, up: T) -> &mut Self
where f64: From<S> + From<T>,

Set the range in the z axis. If down > up, then the y axis is inverted.

§Remarks

This is a mirror method of rangez, for convinience.

source

fn set_data_extension<S: AsRef<OsStr>>(&mut self, extension: S) -> &mut Self

Set an extension for the data file.

§Default

The default value is txt.

let seq = (0..10).preexplore();
assert_eq!(seq.data_extension().unwrap().to_str(), Some("txt"));
source

fn set_plot_extension<S: AsRef<OsStr>>(&mut self, extension: S) -> &mut Self

Set an extension for the data file.

§Default

The default value is gnu.

let seq = (0..10).preexplore();
assert_eq!(seq.plot_extension().unwrap().to_str(), Some("gnu"));
source

fn set_header(&mut self, header: bool) -> &mut Self

Decide the presence of headers in the data file. If activated, then title, date and other information are included as a comment in the data file.

§Default

The default value is true.

let seq = (0..10).preexplore();
assert_eq!(seq.header(), true);
source

fn set_style<S>( &mut self, style: S ) -> Result<&mut Self, <S as TryInto<Style>>::Error>
where S: TryInto<Style>,

Choose the style for the plot. Too see all options, go to Style struct. If you set a style and then compare with other structs, then in the joint plot, the style shall be mantained for those structs that had a style not setted by default.

§Default

The default value is default, which means lines.

let seq = (0..10).preexplore();
assert_eq!(seq.style().to_string(), "Default".to_string());
source

fn set_dashtype(&mut self, dashtype: usize) -> &mut Self

Choose the dashtype for the plot. Following the gnuplot standar, it has a cyclic behaviour.

source

fn set_date(&mut self, date: DateTime<Local>) -> &mut Self

Choose the date used when saving files.

§Default

Time upon creation.

let seq = (0..10).preexplore();
println!("{}", seq.date());
source

fn set_id<S: Display>(&mut self, id: S) -> &mut Self

Set the unique id or file name with which both data and plot script will be saved. There is no default value and one must set it before plotting or saving.

When only saving data, prefer saving_with_id method.

§Remarks

Commonly used methods like plot and plot_later internally call this method for ease of use.

§Examples

Correctly identifying before saving.

let mut seq = (0..10).preexplore();
seq.set_id("my_id").save().unwrap();

Incorrectly identifying before saving. This panics.

(0..10).preexplore().save().unwrap();
source

fn set_custom<S: Display, T: Display>(&mut self, key: S, value: T) -> &mut Self

Include custom configuration fields into the Configuration struct. This is intended for all new configurations you want, specially if you are implementing the traits.

§Examples

Setting a subtitle option.

let mut seq = (0..10).preexplore();
seq.set_custom("subtitle", "My subtitle");
assert_eq!(seq.custom("subtitle").unwrap().as_str(), "My subtitle");
source

fn set_ticsx<T, S>(&mut self, ticsx: T) -> &mut Self
where T: Into<Option<S>>, S: Display,

Control tics in the x axis. Passing "" shows no tics. See gnuplot documentation for a correct format.

§Examples

Showing only from 0 to 10, at a step of 0.35.

let mut seq = (0..10).preexplore();
seq.set_ticsx("0, 1.35, 10");
assert_eq!(seq.ticsx().unwrap().as_str(), "0, 1.35, 10");

Showing no tics.

let mut seq = (0..10).preexplore();
seq.set_ticsx("");
assert_eq!(seq.ticsx().unwrap().as_str(), "");
source

fn set_ticsy<T, S>(&mut self, ticsy: T) -> &mut Self
where T: Into<Option<S>>, S: Display,

Control tics in the y axis. Passing "" shows no tics. See gnuplot documentation for a correct format.

§Examples

Showing only from 0 to 10, at a step of 0.35.

let mut seq = (0..10).preexplore();
seq.set_ticsy("0, 1.35, 10");
assert_eq!(seq.ticsy().unwrap().as_str(), "0, 1.35, 10");

Showing no tics.

let mut seq = (0..10).preexplore();
seq.set_ticsy("");
assert_eq!(seq.ticsx().unwrap().as_str(), "");
source

fn set_ticsz<T, S>(&mut self, ticsz: T) -> &mut Self
where T: Into<Option<S>>, S: Display,

Control tics in the z axis. Passing "" shows no tics. See gnuplot documentation for a correct format.

source

fn set_xtics<T, S>(&mut self, ticsx: T) -> &mut Self
where T: Into<Option<S>>, S: Display,

Control tics in the x axis. See gnuplot documentation for a correct format.

§Remarks

This is a mirror method of ticsx, for convinience.

source

fn set_ytics<T, S>(&mut self, ticsy: T) -> &mut Self
where T: Into<Option<S>>, S: Display,

Control tics in the y axis. See gnuplot documentation for a correct format.

§Remarks

This is a mirror method of ticsy, for convinience.

source

fn set_ztics<T, S>(&mut self, ticsz: T) -> &mut Self
where T: Into<Option<S>>, S: Display,

Control tics in the z axis. See gnuplot documentation for a correct format.

§Remarks

This is a mirror method of ticsz, for convinience.

source

fn set_pause<T, S>(&mut self, pause: T) -> &mut Self
where T: Into<Option<S>>, f64: From<S>,

Control the time for which the plot is in the screen. The unit is seconds. Any negative number means “until a key is pressed”. To have no pause, pass 0, instead of None.

§Default

The default value is -1.

let seq = (0..10).preexplore();
assert_eq!(seq.pause(), Some(-1.0));
§Examples

This plot will wait two seconds before closing.

let mut seq = (0..10).preexplore();
seq.set_pause(2);
assert_eq!(seq.pause(), Some(2.0));
seq.plot("two_seconds_test").unwrap();

This plot will have no pause before closing.

let mut seq = (0..10).preexplore();
seq.set_pause(0);
assert_eq!(seq.pause(), Some(0.0));
seq.plot("silent_plot").unwrap();
source

fn title(&self) -> Option<&String>

source

fn logx(&self) -> Option<f64>

source

fn logy(&self) -> Option<f64>

source

fn logz(&self) -> Option<f64>

source

fn xlog(&self) -> Option<f64>

source

fn ylog(&self) -> Option<f64>

source

fn zlog(&self) -> Option<f64>

source

fn labelx(&self) -> Option<&String>

source

fn labely(&self) -> Option<&String>

source

fn labelz(&self) -> Option<&String>

source

fn xlabel(&self) -> Option<&String>

source

fn ylabel(&self) -> Option<&String>

source

fn zlabel(&self) -> Option<&String>

source

fn rangex(&self) -> Option<(f64, f64)>

source

fn rangey(&self) -> Option<(f64, f64)>

source

fn rangez(&self) -> Option<(f64, f64)>

source

fn xrange(&self) -> Option<(f64, f64)>

source

fn yrange(&self) -> Option<(f64, f64)>

source

fn zrange(&self) -> Option<(f64, f64)>

source

fn plot_extension(&self) -> Option<&OsStr>

source

fn data_extension(&self) -> Option<&OsStr>

source

fn plot_path(&self) -> &Path

source

fn data_path(&self) -> &Path

source

fn header(&self) -> bool

source

fn style(&self) -> &Style

source

fn dashtype(&self) -> Option<usize>

source

fn date(&self) -> &DateTime<Local>

source

fn id(&self) -> Option<&String>

source

fn checked_id(&self) -> &String

source

fn custom<S: Display>(&self, key: S) -> Option<&String>

source

fn ticsx(&self) -> Option<&String>

source

fn ticsy(&self) -> Option<&String>

source

fn ticsz(&self) -> Option<&String>

source

fn xtics(&self) -> Option<&String>

source

fn ytics(&self) -> Option<&String>

source

fn ztics(&self) -> Option<&String>

source

fn pause(&self) -> Option<f64>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Configurable for Configuration

source§

impl Configurable for SequenceError

source§

impl Configurable for SequenceErrors

source§

impl<T> Configurable for Data<T>
where T: Display,

source§

impl<T> Configurable for Densities<T>
where T: Display + Clone,

source§

impl<T> Configurable for Density<T>
where T: Display + Clone,

source§

impl<T> Configurable for ProcessError<T>
where T: Display + Clone,

source§

impl<T> Configurable for ProcessErrors<T>
where T: Display + Clone,

source§

impl<T> Configurable for Sequence<T>
where T: Display + Clone,

source§

impl<T> Configurable for SequenceBin<T>
where T: Display + Clone,

source§

impl<T> Configurable for SequenceBins<T>
where T: Display + Clone,

source§

impl<T> Configurable for SequenceViolin<T>
where T: Display + Clone,

source§

impl<T> Configurable for SequenceViolins<T>
where T: Display + Clone,

source§

impl<T> Configurable for Sequences<T>
where T: Display + Clone,

source§

impl<T, S> Configurable for Process<T, S>
where T: Display + Clone, S: Display + Clone,

source§

impl<T, S> Configurable for ProcessBin<T, S>
where T: Display + Clone, S: Display + Clone,

source§

impl<T, S> Configurable for ProcessBins<T, S>
where T: Display + Clone, S: Display + Clone,

source§

impl<T, S> Configurable for ProcessViolin<T, S>
where T: Display + Clone, S: Display + Clone,

source§

impl<T, S> Configurable for ProcessViolins<T, S>
where T: Display + Clone, S: Display + Clone,

source§

impl<T, S> Configurable for Processes<T, S>
where T: Display + Clone, S: Display + Clone,

source§

impl<T, S, U> Configurable for Contour<T, S, U>
where T: Display + Clone, S: Display + Clone, U: Display + Clone,

source§

impl<T, S, U> Configurable for Heatmap<T, S, U>
where T: Display + Clone, S: Display + Clone, U: Display + Clone,

source§

impl<T, S, U> Configurable for Heatmaps<T, S, U>
where T: Display + Clone, S: Display + Clone, U: Display + Clone,