Plot
Plot module: SVG chart generation.
Generates self-contained SVG strings for line, scatter, bar, and histogram charts. No external dependencies — pure March string building.
Usage: let svg = Plot.new() |> Plot.add_series(Plot.line_series(xs, ys)) |> Plot.set_title("My Chart") |> Plot.to_svg
Types
typeColorColor = { r : Int, g : Int, b : Int }#
typeSeriesKindSeriesKind = Line | Scatter | Bar | HistogramSeries#
Functions
fnnew_sizednew_sized(w : Int, h : Int) : Plot#
fnline_seriesline_series(xs : List(Float), ys : List(Float)) : Series#
fnscatter_seriesscatter_series(xs : List(Float), ys : List(Float)) : Series#
fnbar_seriesbar_series(labels : List(String), values : List(Float)) : Series#
fnhistogram_serieshistogram_series(values : List(Float), bins : Int) : Series#
fnadd_labeled_seriesadd_labeled_series(p : Plot, s : Series, lbl : String) : Plot#
fnset_titleset_title(p : Plot, t : String) : Plot#
fnset_xlabelset_xlabel(p : Plot, l : String) : Plot#
fnset_ylabelset_ylabel(p : Plot, l : String) : Plot#
fnset_x_rangeset_x_range(p : Plot, lo : Float, hi : Float) : Plot#
fnset_y_rangeset_y_range(p : Plot, lo : Float, hi : Float) : Plot#
fnset_sizeset_size(p : Plot, w : Int, h : Int) : Plot#
fnto_svgto_svg(p : Plot) : String#
fnsavesave(p : Plot, path : String) : Result(Unit, String)#
fnquick_linequick_line(xs : List(Float), ys : List(Float)) : String#
fnquick_scatterquick_scatter(xs : List(Float), ys : List(Float)) : String#
fnquick_barquick_bar(labels : List(String), values : List(Float)) : String#
fnquick_histogramquick_histogram(values : List(Float), bins : Int) : String#