[][src]Crate preexplorer

Save data and have a glance at it with quick plots. Leave the detailed plotting to other interactive tools like gnuplot.

Do you have a costly process in Rust and want to save the data for postprocessing? Would you like to still have a basic glance to check it and leave fine-tuning of the plot for later? This is the crate for you!

Philosophy

Rust is great at computing, making the perfect plot takes times and repetition. This repetitive process in search of the perfect plot should be done externally, and does not need Rust computing power. Therefore, once you achieve the data in Rust, save it, have a quick glance, and leave a simple gnuplot-script to start the fine tunning of your perfect plot.

Remarks

All data will be saved under the folder "target\preexplorer\data" in the main directory. Plot scripts are saved under the foleder "target\preexplorer\plots".

Recall that you will need to install gnuplot to use the crate at its full potential.

Examples

Quickly check your results.

use preexplorer::prelude::*;
(0..100).map(|i| i * i)
    .preexplore()
    .plot("My first plot")
    .unwrap();

Check numerical simulations.

use preexplorer::prelude::*;
use rand_distr::Exp1;
use rand::prelude::*;
let simulation_results: Vec<f64> = (0..100).map(|_| thread_rng().sample(Exp1)).collect();
pre::Density::new(simulation_results)
    .title("Empirical Exponential 1")
    .plot("My first empirical distribution")
    .unwrap();

Re-exports

pub use configuration::*;
pub use constants::*;
pub use data::*;
pub use density::*;
pub use errors::*;
pub use process::*;
pub use sequence::*;
pub use traits::*;

Modules

configuration

Struct with all configurations for saving and ploting. Configuration for all basic options included.

constants

Directory paths.

data

Generic multi-dimensional data. Not automatically ploted. Generic multi-dimensional data.

density

Histograms or realizations of the same variable. Empirical densities. Histogram type of plotting: point cloud, density or probability density function (pdf) and cummulative density function (cdf).

errors

Errors wrapper from writting data. Errors from the crate.

prelude

All you ussually need. Easily start preexploring you results.

process

Time-series, indexed by a subset of R. Indexed collection of values.

sequence

Process indexed by 1, 2, 3, ... Most basic explorable structure: a sequence of values.

traits

Traits for easy use or self implmentation.