Single Axis
Single Axis
A single-axis chart.
Usage
from dataviz_mojo import single_axis
from dataviz_mojo.plot import save
from dataviz_mojo.theme import Theme
def main() raises:
var response_ms: List[Float64] = [
12.0, 14.0, 13.0, 15.0, 11.0, 14.0, 13.0, 12.0, 45.0, 15.0, 13.0, 14.0, 12.0, 90.0, 14.0,
]
var c = single_axis(response_ms)
save(c, "docs/src/examples/out_single_axis.svg")Args:
x: The continuous column, one entry per point, plotted along the single horizontal axis.color: Optional continuous color channel, mapped through a gradient spanning its own[min, max]; mutually exclusive withcolor_categories. Left empty (the default), every point usesTheme.mark_color.color_categories: Optional discrete color channel, palette- colored by each value’s first-seen order; mutually exclusive withcolor. Left empty (the default), every point usesTheme.mark_color.size: Optional point-size channel. Left empty (the default), every point usesTheme.point_radius.theme: Full styling knobs beyond this function’s own parameters (colors, margins, fonts, gridlines, …) – seeTheme’s docstring.width: Pixel width of the returnedPlot(.size()).height: Pixel height of the returnedPlot(.size()).title: The chart’s title, shown above the plot.subtitle: A secondary line shown under the title.x_title: The x-axis caption.