epezent / implot

Immediate Mode Plotting
MIT License
4.65k stars 517 forks source link

Realtime plots of 100% stacked areas #410

Closed christoffere closed 1 year ago

christoffere commented 1 year ago

Hi,

I'm looking for a way to render realtime plots of 100% stacked areas.

Is this possible as is already? I imagine I can use stacked bars (added in https://github.com/epezent/implot/issues/288) with normalized values in range 0..1, and 1px wide groups with 0px distance, and scrolling buffers as in the realtime plots demos. But it doesn't feel like the right way to go about :)

Thinking of something like this for showing realtime cpu/memory consumption for different categories contributing to the whole: image

Should mention I just recently discovered implot and am very impressed so far, super nice job, thanks!

christoffere commented 1 year ago

Answering myself here and yes, this is possible! Got it working nicely by using ImPlot::PlotShaded with pre-stacked-calculated inputs and scrolling buffers as in the realtime plots demo.

Closing issue and once more thank your for an awesome library!