Externalize easily the plotting process from Rust to gnuplot.

Overview

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. When comparing processes (Process-related structs), why must they be the same structs? The comparison of processes (Processes-related structs) are a collection of processes. As such, it works as Vec , so two process structs must be the same type to be compared.
  2. Are there n-dimensional variants? No, it is out of scope. If you want to implement similar functionalities, you can do so easily based on the source code for Data.
  3. How to deactivate some options, e.g. tics? All structs implement the trait Configurable. Each option has documented how to disable it in its corresponding method.

Disclaimer

There is no connection with the gnuplot project.

Changelog

See Changelog.

References

A nice overview of what a good plot should look like: https://serialmentor.com/dataviz/

For the reader

Has this project been useful to you? How? :) Let me know through a github issue!

You might also like...
A Rust API for Vega-Lite V4 to build chart with a rusty API.
A Rust API for Vega-Lite V4 to build chart with a rusty API.

Vega-Lite V4 for Rust A Rust API for Vega-Lite V4 to build chart with a rusty API. Similar to the Altair project in python, this crate build upon Vega

A pure Rust visualization library inspired by D3.js

charts A pure Rust visualization library inspired by D3.js. See gallery and examples for code and more charts. Install You can add this as a dependenc

A library to generate syntax diagrams for Rust macros.

Live demo (code) A browser add-on for Firefox, Chrome and Edge A library to generate syntax ("railroad") diagrams for Rust's macro_rules!(). Diagrams

Graphical Rust program that uses a fractal algorithm to draw a tree of sorts

rusty-vegetation Graphical Rust program that uses a fractal algorithm to draw a "tree" of sorts. To Build and Run On Linux: Install build-essentials o

A Rust program for visualizing how sections get packed into your Game Boy ROM

GB Packing Visualizer A Rust program for visualizing how sections get packed into your Game Boy ROM. rhythm_land.mp4 Each column represents a ROM bank

Lightweight graphs (sparklines) for use with Embedded Rust
Lightweight graphs (sparklines) for use with Embedded Rust

Sparklines for Rust's Embedded-graphics Sparklines are small, high resolution graphics embedded in a context of words, numbers or images". Edward Tuft

A Rust library for drawing plots, powered by Gnuplot.
A Rust library for drawing plots, powered by Gnuplot.

RustGnuplot A Gnuplot controller written in Rust. Documentation See here Examples A simple example: let mut fg = Figure::new(); fg.axes2d() .set_titl

A Rust on-site channel benchmarking helper. Inter-Process (async / busy) & Intra-Process (async single threaded / async multi threaded)

On-Site Rust Channel Benchmarking Helper Deploy on server to determine which public crates are the fastest for communicating in different architecture

secmem-proc is a crate designed to harden a process against low-privileged attackers running on the same system trying to obtain secret memory contents of the current process.

secmem-proc is a crate designed to harden a process against low-privileged attackers running on the same system trying to obtain secret memory contents of the current process. More specifically, the crate disables core dumps and tries to disable tracing on unix-like OSes.

Data plotting library for Rust
Data plotting library for Rust

plotlib plotlib is a generic data visualisation and plotting library for Rust. It is currently in the very early stages of development. It can current

A rust drawing library for high quality data plotting for both WASM and native, statically and realtimely ๐Ÿฆ€ ๐Ÿ“ˆ๐Ÿš€
A rust drawing library for high quality data plotting for both WASM and native, statically and realtimely ๐Ÿฆ€ ๐Ÿ“ˆ๐Ÿš€

Plotters - A Rust drawing library focus on data plotting for both WASM and native applications ๐Ÿฆ€ ๐Ÿ“ˆ ๐Ÿš€ Plotters is drawing library designed for rende

#creativecoding Plotting done with rust โ€“ published on Twitter @greweb with #plottingtwitter
#creativecoding Plotting done with rust โ€“ published on Twitter @greweb with #plottingtwitter

Similarly to "One day, One shader" ( https://github.com/gre/shaderday.com ), this Rust project is a "generative art" that, for each entry in examples/

Render farm simulator & plotting for optimisation written in Rust.
Render farm simulator & plotting for optimisation written in Rust.

Farm Usage Simulator Given a few basic charasteristics of a render farm and render jobs this app runs a few randomized farm usage scenarios and plots

Terminal plotting library for using in Rust CLI applications
Terminal plotting library for using in Rust CLI applications

textplots Terminal plotting library for using in Rust CLI applications. Should work well in any unicode terminal with monospaced font. It is inspired

A simple 2D plotting library that outputs graphs to SVG that can be styled using CSS.

Poloto graphs can be stylized using css either directly in the SVG, or from inside of html with an embedded svg. The latter allows the user to dynamically match the svg to their website's theme.

Plotting library for the Bevy game engine with a focus on esthetics and interactivity
Plotting library for the Bevy game engine with a focus on esthetics and interactivity

Plotting library for the Bevy game engine with a focus on esthetics and interactivity. It can handle both data points (see the "minimal", "markers", a

An extensible plotting library for CLI applications.
An extensible plotting library for CLI applications.

termplot An extensible plotting library for CLI applications. Quick Start Documentation Examples Plotting a function Historigram Composing multiple pl

Rust library to create a Good Game Easily

ggez What is this? ggez is a Rust library to create a Good Game Easily. The current version is 0.6.0-rc0. This is a RELEASE CANDIDATE version, which m

โฎ โฏ โญ A Rust library to easily read forwards, backwards or randomly through the lines of huge files.

EasyReader The main goal of this library is to allow long navigations through the lines of large files, freely moving forwards and backwards or gettin

Owner
Raimundo Saona
Raimundo Saona
Data plotting library for Rust

plotlib plotlib is a generic data visualisation and plotting library for Rust. It is currently in the very early stages of development. It can current

Matt Williams 417 Dec 31, 2022
A rust drawing library for high quality data plotting for both WASM and native, statically and realtimely ๐Ÿฆ€ ๐Ÿ“ˆ๐Ÿš€

Plotters - A Rust drawing library focus on data plotting for both WASM and native applications ?? ?? ?? Plotters is drawing library designed for rende

Hao Hou 2.7k Jan 4, 2023
Render farm simulator & plotting for optimisation written in Rust.

Farm Usage Simulator Given a few basic charasteristics of a render farm and render jobs this app runs a few randomized farm usage scenarios and plots

ford 2 Jul 17, 2022
A simple 2D plotting library that outputs graphs to SVG that can be styled using CSS.

Poloto graphs can be stylized using css either directly in the SVG, or from inside of html with an embedded svg. The latter allows the user to dynamically match the svg to their website's theme.

Ken Reed 119 Dec 13, 2022
A small charting/visualization tool and partial vega implementation for Rust

Gust A charting library for rust! Disclaimer This is still very much a work in progress! APIs are very unstable and subject to change. Contributions a

Samuel Resendez 128 Dec 24, 2022
Plotly for Rust

Plotly.rs Plotly for Rust Getting Started | Recipes | API Docs | Changelog | | | A plotting library for Rust powered by Plotly.js. Usage Add this to y

Ioannis Giagkiozis 671 Jan 8, 2023
This is a Rust implementation of a boid flocking simulation using the ggez graphics crate.

Boidflock This is a Rust implementation of a boid flocking simulation using the ggez graphics crate. The CLI for this program is built using the struc

Andrew Lee 12 Jan 4, 2023
Swash is a pure Rust, cross-platform crate that provides font introspection, complex text shaping and glyph rendering.

Swash is a pure Rust, cross-platform crate that provides font introspection, complex text shaping and glyph rendering. Goals This crate aims to

Chad Brokaw 398 Dec 14, 2022
Rust crate for creating beautiful interactive Chord Diagrams

Chord PRO Released Chord PRO is the full-featured chord visualization API, producing beautiful interactive visualizations, e.g. those featured on the

Dr. Shahin Rostami 25 Sep 10, 2022