https://github.com/vtereshkov/umplot
UmPlot: A plotting library for Umka
https://github.com/vtereshkov/umplot
Last synced: about 1 year ago
JSON representation
UmPlot: A plotting library for Umka
- Host: GitHub
- URL: https://github.com/vtereshkov/umplot
- Owner: vtereshkov
- License: bsd-2-clause
- Created: 2021-12-30T22:35:31.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-06T19:59:56.000Z (about 2 years ago)
- Last Synced: 2024-04-06T20:40:31.460Z (about 2 years ago)
- Language: C
- Size: 259 KB
- Stars: 11
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UmPlot
UmPlot: A plotting library for [Umka](https://github.com/vtereshkov/umka-lang) based on [raylib](https://www.raylib.com).
## Example
```
import "umplot.um"
fn main() {
plt := umplot::init(4)
for i := 0; i < 4; i++ {
plt.series[i].name = sprintf("Sine wave %d", i + 1)
for x := 0.0; x <= 100.0; x += 1.0 {
y := (1 + 0.5 * i) * sin(x / 10.0 + i)
plt.series[i].add(x, y)
}
}
plt.series[1].style.kind = .scatter
plt.titles.graph = "UmPlot demo"
plt.titles.x = "Time (seconds)"
plt.titles.y = "Value"
plt.plot()
}
```
