plotters-rs / plotters

A rust drawing library for high quality data plotting for both WASM and native, statically and realtimely 🦀 📈🚀
https://plotters-rs.github.io/home/
MIT License
3.89k stars 281 forks source link

Step charts #586

Open kasparthommen opened 6 months ago

kasparthommen commented 6 months ago

What is the feature ?

An option to plot step charts, analogous to e.g. https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.step.html

(Optional) Why this feature is useful and how people would use the feature ?

Because linear interpolation between data points isn't necessarily the correct way to connect two data points. If the price of a stock is 100 at t=0 and at t=10 it changes to 103, then it was 100 for all 0 <= t < 10, i.e, it didn't gradually rise to 103 but it did so in a step change.