#visualization #plotting

preexplorer

Easy plotter and saver of simple data. Handy tool for development stage or small computational projects.

9 releases

0.3.3 Sep 26, 2020
0.3.2 Jul 13, 2020
0.3.1 Jun 4, 2020
0.2.4 May 2, 2020
0.1.1 Mar 24, 2020

#12 in Visualization

Download history 8/week @ 2020-06-28 9/week @ 2020-07-05 31/week @ 2020-07-12 17/week @ 2020-07-19 2/week @ 2020-07-26 2/week @ 2020-08-02 34/week @ 2020-08-09 11/week @ 2020-08-16 4/week @ 2020-08-23 12/week @ 2020-08-30 36/week @ 2020-09-06 3/week @ 2020-09-13 11/week @ 2020-09-20 14/week @ 2020-09-27 13/week @ 2020-10-04 6/week @ 2020-10-11

58 downloads per month
Used in markovian

MIT/Apache

300KB
4K SLoC

preexplorer

Download License Docs Crate

Easy plotter and saver of simple data. Handy tool for development stage or small computational projects. Save data, have a quick view and an initial gnuplot script to plot it.

If you are looking for a pure Rust plotter, check out plotters.

Purpose

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!

Work flow

  1. Compute your thing in Rust
  2. Pass the results to a suitable struct from preexplorer, or use the preexplore method.
  3. Use the method plot or plot_later.

After cargo run, your data is saved and a suitable first script for gnuplot to plot the data is saved. If you used plot, you will get a plot by gnuplot that you can save.

The gnuplot script is located in

target\\preexplorer\\plots\\my_identifier.gnu

where my_identifier is the name you gave in rust to the plot.

Therefore, to run it in gnuplot (and get the plot again), run from the console

gnuplot target\\preexplorer\\plots\\my_identifier.gnu

  • Want a different plot? Change this file according to your needs and run again.

  • Want to use gnuplot as an interactive plotting engine? Run gnuplot in the console, copy and paste the script and keep going with your favorite gnuplot commands.

Main features

  • Easy plotting
  • Easy comparison
  • Implementable traits
  • Extensive documentation

Gallery

Sequences

Processes

Densities

Heatmaps

For more, see the folder examples.

Installation

  • Download and install gnuplot, a command line engine for plotting. (Note that the gnuplot project has nothing to do with GNU).
  • Add preexplorer = "*" to your Cargo.toml file under [dependencies].
  • I suggest to simply go with use preexplorer::prelude::*; in your binary, and then use the short-name pre::... and the preexplore method directly in iterators and tuple of iterators.

Future

  • More senses involved in exploration
    • Audio
      • audify()
      • sonify()

Q & A

  1. Why processes must be the same structs to be compared? Because of Rust explicit typing: comparisons need to save an explicit type.
  2. Are there n-dimensional variants? No, it is out of scope. Please implement your own plot script for that. You can do so easily based in the Data struct.
  3. How to deactivate some options, e.g. tics? What would represent the empty value instead of None. This happens because of inferring type errors in Rust.

Disclaimer

There is no connection with the gnuplot project.

Changelog

See Changelog.

Dependencies

~3MB
~53K SLoC