r/bioinformaticsdev • u/Psy_Fer_ • Oct 31 '25
Feedback I am writing a plotting library in Rust - which plots do you want?
I am writing a new plotting library in rust, because I found the existing ones, like plotters, were tricky to make publication level plots.
It's been really fun designing it and trying to solve a number of pain points I always have, like making it automatically scale and handle the axes, create legends, grouped plots for bar charts and violin plots.
Here is a list of plots I have so far:
Bar
boxplot
brickplot (a new plot type for showing repeating elements - made for STR stuff)
heatmap
histogram
2d histogram
line
pie
scatter
series
violin
Happy to add in your favourite plot while i'm still testing and adding features.
The way the plotting works for the library is a basic builder type method
let data = (0..100)
.map(|x| (x as f64 / 10.0).sin())
.collect::<Vec<_>>();
let series = SeriesPlot::new()
.with_data(data)
.with_color("green")
.with_line_point_style()
.with_legend("sine");
let plots = vec![Plot::Series(series)];
let layout = Layout::auto_from_plots(&plots)
.with_x_label("Time (s)")
.with_y_label("Amplitude")
.with_title("Sine Wave");
// .with_ticks(6);
let scene = render_multiple(plots, layout);
let svg = SvgBackend.render_scene(&scene);
std::fs::write("test_outputs/series_builder.svg", svg.clone()).unwrap();
It will also have a binary, that allows you to create the basic version of any plot type from data piped to it or read from a simple tsv file on the command line. I wanted this to be something to add to my tool list for data exploration, or just visualising a distribution, or some kind of stats.
I wrote this so I could use it in a tool i'm releasing soon that has a visual component, and I figured I might as well complete it so others can use it/add to it.
So, which plot type would you like it to have that isn't there yet?
Here are a few more examples: (you may need to click on them on PC - preview is blurry, but they seem to show fine on a phone)





0
u/[deleted] Nov 01 '25
[deleted]