[−][src]Trait preexplorer::traits::Plotable
Required methods
fn plot_script(&self) -> String
Construct a suitable plot script for the struct.
Provided methods
fn plot_later<S: Display>(
&mut self,
id: S
) -> Result<&mut Self, PreexplorerError>
&mut self,
id: S
) -> Result<&mut Self, PreexplorerError>
Do everything except running the command of plotting. In other words:
- Assign id.
- Save the data.
- Save the plot script.
Remarks
Specially useful when used in Data
struct. So one can write the
particular plot script later.
Examples
Save data and plot script for posterior analysis.
let data = array![ [1, 2, 3, 4, 5], [2, 5, 6, 7, 8], [3, 11, 12, 13, 14], ]; let dim = 5; pre::Data::new(data.iter(), dim) .plot_later("my_identifier") .unwrap();
fn plot<S: Display>(&mut self, id: S) -> Result<&mut Self, PreexplorerError>
Main command. In other words:
- Assign id.
- Save the data.
- Save the plot script.
- Run (asynchronous) the plot script.
Examples
Quickest plot.
(0..10).preexplore() .plot("my_identifier") .unwrap();
fn plot_with_script<S: Display, T: Display>(
&mut self,
id: S,
script: T
) -> Result<&mut Self, PreexplorerError>
&mut self,
id: S,
script: T
) -> Result<&mut Self, PreexplorerError>
Plot with a custom script. In other words:
- Assign id.
- Save the data.
- Save the custom plot script.
- Run (asynchronous) the plot script.
Remarks
This is useful when you found a particular gnuplot script you want to plot your data with and want to do it directly from Rust. Then, you must hard-code your script in Rust (copy-paste from internet, most of the times).
Note that you will have to write the full path to the data in the gnuplot format, see the example for more.
Examples
Quickest plot.
let mut seq = (0..10).preexplore(); seq.plot_with_script("my_identifier", " plot \"target/preexplorer/data/my_identifier.txt\" with linespoints linecolor 3 pause 3 ").unwrap();
fn write_plot_script<S: Display>(
&self,
gnuplot_script: S
) -> Result<&Self, PreexplorerError>
&self,
gnuplot_script: S
) -> Result<&Self, PreexplorerError>
Write plot script given by plot_script
in the machine for posterior running.
Remarks
The method plot_later
might be more useful.
fn opening_plot_script(&self) -> String
Helper method for implementing Plotable
.
fn ending_plot_script(&self) -> String
Helper method for implementing Plotable
.
Implementors
impl Plotable for SequenceError
[src]
fn plot_script(&self) -> String
[src]
impl Plotable for SequenceErrors
[src]
fn plot_script(&self) -> String
[src]
impl<T> Plotable for Data<T> where
T: Display + Clone,
[src]
T: Display + Clone,
fn plot<S: Display>(&mut self, id: S) -> Result<&mut Self, PreexplorerError>
[src]
Calls plot_later method and retunrs error since generic data should be plotted by hand interacting with gnuplot.
fn plot_script(&self) -> String
[src]
impl<T> Plotable for Densities<T> where
T: Display + Clone,
[src]
T: Display + Clone,
fn plot_script(&self) -> String
[src]
impl<T> Plotable for Density<T> where
T: Display + Clone,
[src]
T: Display + Clone,
fn plot_script(&self) -> String
[src]
impl<T> Plotable for ProcessError<T> where
T: Display + Clone,
[src]
T: Display + Clone,
fn plot_script(&self) -> String
[src]
impl<T> Plotable for ProcessErrors<T> where
T: Display + Clone,
[src]
T: Display + Clone,
fn plot_script(&self) -> String
[src]
impl<T> Plotable for Sequence<T> where
T: Display + Clone,
[src]
T: Display + Clone,
fn plot_script(&self) -> String
[src]
impl<T> Plotable for SequenceBin<T> where
T: Display + Clone,
[src]
T: Display + Clone,
fn plot_script(&self) -> String
[src]
impl<T> Plotable for SequenceBins<T> where
T: Display + Clone,
[src]
T: Display + Clone,
fn plot_script(&self) -> String
[src]
impl<T> Plotable for SequenceViolin<T> where
T: Display + Clone,
[src]
T: Display + Clone,
fn plot_script(&self) -> String
[src]
impl<T> Plotable for SequenceViolins<T> where
T: Display + Clone,
[src]
T: Display + Clone,
fn plot_script(&self) -> String
[src]
impl<T> Plotable for Sequences<T> where
T: Display + Clone,
[src]
T: Display + Clone,
fn plot_script(&self) -> String
[src]
impl<T, S> Plotable for Process<T, S> where
T: Display + Clone,
S: Display + Clone,
[src]
T: Display + Clone,
S: Display + Clone,
fn plot_script(&self) -> String
[src]
impl<T, S> Plotable for ProcessBin<T, S> where
T: Display + Clone,
S: Display + Clone,
[src]
T: Display + Clone,
S: Display + Clone,
fn plot_script(&self) -> String
[src]
impl<T, S> Plotable for ProcessBins<T, S> where
T: Display + Clone,
S: Display + Clone,
[src]
T: Display + Clone,
S: Display + Clone,
fn plot_script(&self) -> String
[src]
impl<T, S> Plotable for ProcessViolin<T, S> where
T: Display + Clone,
S: Display + Clone,
[src]
T: Display + Clone,
S: Display + Clone,
fn plot_script(&self) -> String
[src]
impl<T, S> Plotable for ProcessViolins<T, S> where
T: Display + Clone,
S: Display + Clone,
[src]
T: Display + Clone,
S: Display + Clone,
fn plot_script(&self) -> String
[src]
impl<T, S> Plotable for Processes<T, S> where
T: Display + Clone,
S: Display + Clone,
[src]
T: Display + Clone,
S: Display + Clone,
fn plot_script(&self) -> String
[src]
impl<T, S, U> Plotable for Heatmap<T, S, U> where
T: Display + Clone,
S: Display + Clone,
U: Display + Clone,
[src]
T: Display + Clone,
S: Display + Clone,
U: Display + Clone,
fn plot_script(&self) -> String
[src]
impl<T, S, U> Plotable for Heatmaps<T, S, U> where
T: Display + Clone,
S: Display + Clone,
U: Display + Clone,
[src]
T: Display + Clone,
S: Display + Clone,
U: Display + Clone,