Skip to content

Commit c4f5cd7

Browse files
authored
Update README.md
1 parent e5e47af commit c4f5cd7

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,24 @@
1-
# umplot
2-
UmPlot: A plotting library for Umka
1+
# UmPlot
2+
UmPlot: A plotting library for [Umka](https://github.com/vtereshkov/umka-lang) based on [raylib](https://www.raylib.com).
3+
4+
## Example
5+
```
6+
import "umplot.um"
7+
8+
fn main() {
9+
plt := umplot.init(4)
10+
11+
for x := 0.0; x <= 100.0; x += 1.0 {
12+
for i := 0; i < 4; i++ {
13+
y := (1 + 0.5 * i) * sin(x / 10.0 + i)
14+
plt.series[i].add(x, y)
15+
}
16+
}
17+
18+
plt.series[1].style.kind = umplot.STYLE_SCATTER
19+
20+
plt.plot()
21+
}
22+
```
23+
![](umplot.png)
24+

0 commit comments

Comments
 (0)