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

Rust crate for creating beautiful interactive Chord Diagrams
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

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

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

Task runner and process manager for Rust
Task runner and process manager for Rust

Steward Task runner and process manager for Rust. If you're not happy managing your infrastructure with a pile of bash scripts, this crate might be he

MiniDump a process in memory with rust

safetydump Rust in-memory MiniDump implementation. Features ntdll!NtGetNextProcess to obtain a handle for the desired ProcessId as opposed to kernel32

Structure-aware, in-process, coverage-guided, evolutionary fuzzing engine for Rust functions.

fuzzcheck Fuzzcheck is a structure-aware, in-process, coverage-guided, evolutionary fuzzing engine for Rust functions. Given a function test: (T) - b

Rust single-process scheduling. Ported from schedule for Python

Rust single-process scheduling. Ported from schedule for Python, in turn inspired by clockwork (Ruby), and "Rethinking Cron" by Adam Wiggins.

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 411 Nov 26, 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.6k Dec 5, 2022
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 118 Dec 4, 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 Oct 14, 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 638 Nov 24, 2022
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 11 May 20, 2021
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 384 Nov 29, 2022
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

Iulian Gulea 178 Nov 23, 2022