umplot v0.1.3

Plotting library

README


UmPlot

UmPlot: A plotting library for Umka based on raylib.

Example

import "umbox/umplot/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 = umplot.STYLE_SCATTER

    plt.titles.graph = "UmPlot demo"
    plt.titles.x = "Time (seconds)"
    plt.titles.y = "Value"

    plt.plot()
}

Homepage

Documentation

License: BSD-2

Download count: 4


To add this package to your project run:

umbox install umplot

Or download as a tar.


Dependencies

Last updated

2024-01-19T19:33:09