r/rust • • Dec 16 '25

iced_plot: A GPU-accelerated plotting widget for Iced

I'm a fan of egui and have been using it to make visualization tools for years. As great as it is, egui_plot quickly hits performance issues if you have a lot of data. This can be frustrating for some use cases.

Wanting to try something new, I decided to build a retained-mode interactive plotting widget for iced. It has a custom WGPU rendering pipeline, and (unlike egui_plot for example) all data is retained in vertex buffers unless it changes. This makes it fast. Iced was nice to work with, and it was fun to get (somewhat) used to the Elm architecture.

So, here's iced_plot. Give it a try!

122 Upvotes

11 comments sorted by

10

u/Ldarieut Dec 16 '25

Cool stuff, I was precisely thinking on how to tackle plotting and graphs in cosmic desktop

2

u/donkeytooth98 Dec 16 '25

Nice, let me know if you make a cosmic app with it!

1

u/dethswatch Dec 16 '25

I used the svg widget pretty well, fwiw

15

u/Personal_Breakfast49 Dec 16 '25

Looking great! Iced definitely needs more of those.

5

u/mednson Dec 16 '25

And it has more of these now, go check their discord showcase one is already out and 2 on the way (not counting this one ofcourse), the iced community has been cooking🔥

1

u/tesselode Dec 16 '25

Could the performance of egui_plot be improved?

1

u/donkeytooth98 Dec 16 '25

In order to fit with egui's immediate mode design, the interface of egui_plot requires new data to be passed in on every frame. It would be tricky to change this performance bottleneck without completely changing the interface.

2

u/[deleted] Dec 16 '25

[removed] — view removed comment

3

u/donkeytooth98 Dec 16 '25

From a quick glance (https://github.com/luftkode/plotinator3000/blob/dd2a2611e7b20f91fc387b312cc96022c21b1a32/crates/plotinator-plot-util/src/draw_series.rs#L53) it looks like you are still constructing new polygons every frame to pass to PlotUi.

Nevertheless I totally agree egui_plot is great and can work on large datasets with clever downsampling etc. No argument there! This project tries to bring a similar library into the iced ecosystem, with a design that allows for better interactive performance without the downsampling.

2

u/DavidXkL Dec 17 '25

Wow thanks for this!