1 unstable release
0.1.0 | Feb 23, 2024 |
---|
#236 in Visualization
71KB
590 lines
gguppy
gguppy is a multi-platform plotting library based on the grammar of graphics implemented in pure Rust with a no_std feature. Write once, plot anywhere.
Why gguppy?
1. Friendly syntax
Rust is strange for python and R users. gguppy aims to provide a familiar, friendly and ergonomic syntax. You can even write in different coding styles.
Grammar of graphics is a first class citizen in gguppy:
use gguppy::prelude::*
df = minidf!["x" => &[1, 2, 3], "y" => &[4, 5, 6]]
plot = ggplot![df, aes("x", "y")] + geom_point![]
A MATLAB/matplotlib-esque syntax will also be supported.
2. Batteries included
gguppy aims to allow you to write once, plot anywhere using its flexible and extensible architecture.
3. Speed
Workspace Structure
Crates
-
๐ ๏ธ gguppy_core
- ๐ ๏ธ Implementation of the grammer of graphics in
no_std
Rust - ๐ ๏ธ Consumes any dataframe-like structure implementing the
GGData
trait - ๐ ๏ธ Extensible with any plot types implementing the
GGCapable
trait - ๐ ๏ธ Produces geometric primitives implementing the
DrawablePrim
trait - ๐ ๏ธ Compiles for static desktop display or interactive wasm plots
- ๐ ๏ธ Implementation of the grammer of graphics in
-
๐ ๏ธ gguppy_data
- ๐ ๏ธ Minimalist dataframe
minidf
plottable bygguppy
inno_std
Rust - ๐ ๏ธ Features adapters for
arrow
andarrow2
- ๐ ๏ธ Features adapters for
polars
,pandas
, and more
- ๐ ๏ธ Minimalist dataframe
-
๐ ๏ธ arwggplot
- ๐ ๏ธ Minimalist svg backend for
gguppy
inno_std
Rust - ๐ ๏ธ Features vector backends to svg, eps, and more
- ๐ ๏ธ Features raster backends to bmp, png, and more
- ๐ ๏ธ Minimalist svg backend for
Module Layout
- src
- lib.rs -
mod
andre-export
- prelude.rs -
use
statements for the entire library
- lib.rs -
Layout
-
Board (dashboard, drawing board, canvas, etc.) := matplotlib
figure
, ggplot2plot
- size
- layout
- can be turned into an entire dashboard, or powerpoint slide, or engineering printout with titleblock
-
Chart := matplotlib
axes
/subplot
-
Panel := ggplot2
panel
/facet
Elements
Inspiration
-
Grammar of Graphics
-
Rust drawing library
-
SVG composing and rendering
-
Text rendering
-
Mathematical functions