package matrix

  1. Overview
  2. Docs

Module Matrix_charts.ThemeSource

Sourcetype glyphs = {
  1. box : Matrix_grid.Border.t;
    (*

    Axis lines, ticks, the frame, solid gridlines, crosshairs, tip borders and steps.

    *)
  2. dashed : string * string;
    (*

    Dashed lines, horizontal and vertical.

    *)
  3. dotted : string * string;
    (*

    Dotted lines, horizontal and vertical.

    *)
  4. diagonals : string * string;
    (*

    Lines at `Cell rising and falling.

    *)
  5. point : string;
    (*

    A point at `Cell.

    *)
  6. marker : string;
    (*

    Markers and the `Dot arrow head.

    *)
  7. shades : string array;
    (*

    Shades from lightest to fullest. The last fills bars.

    *)
  8. blocks : bool;
    (*

    Whether the terminal draws block elements, braille patterns, sextants and octants. Without them every mark draws whole cells.

    *)
}

The type for the glyphs a chart draws.

Sourcetype t = {
  1. palette : Ansi.Color.t list;
    (*

    Colors of marks without a color and of categories, cycled.

    *)
  2. colors : Ansi.Color.t list;
    (*

    Color scales' colors, low to high, interpolated in Oklab.

    *)
  3. background : Ansi.Color.t option;
    (*

    Fill of the region. None leaves the cells under the chart.

    *)
  4. axis : Ansi.Style.t;
    (*

    Axis lines, ticks and rules.

    *)
  5. label : Ansi.Style.t;
    (*

    Labels, axis titles, legends and text.

    *)
  6. title : Ansi.Style.t;
    (*

    The figure's title.

    *)
  7. grid : Ansi.Style.t;
    (*

    Gridlines.

    *)
  8. minor_grid : Ansi.Style.t;
    (*

    Minor gridlines.

    *)
  9. grid_dash : dash;
    (*

    The pattern of gridlines.

    *)
  10. tip : Ansi.Style.t;
    (*

    Tips' text and fill.

    *)
  11. tip_border : Ansi.Style.t option;
    (*

    Tips' border, None for none.

    *)
  12. tip_padding : int;
    (*

    Columns between a tip's border and its text.

    *)
  13. crosshair : Ansi.Style.t;
    (*

    Crosshairs.

    *)
  14. crosshair_dash : dash;
    (*

    The pattern of crosshairs.

    *)
  15. marker : Ansi.Style.t;
    (*

    Markers.

    *)
  16. glyphs : glyphs;
    (*

    Glyphs.

    *)
  17. dots : dots;
    (*

    The default resolution of strokes and dots.

    *)
  18. tick_length : int;
    (*

    Cells a tick reaches beyond its axis line. At 0 it is a tee in the line.

    *)
  19. label_padding : int;
    (*

    Blank columns between a vertical axis's ticks and its labels. A horizontal axis's labels are on the row of cells after its ticks.

    *)
  20. aspect : float;
    (*

    The height of a cell over its width.

    *)
}

The type for themes.

Sourceval dark : t

dark is the theme for a dark background. Its palette is cyan, magenta, yellow, green, blue, red and three blues, and its color scales run through viridis. Its guides are gray, its gridlines dotted, its dots braille, its ticks tees with labels one column away, its background None and its aspect 2..

Sourceval light : t

light is dark with styles for a light background.

Sourceval light_glyphs : glyphs

light_glyphs are light box-drawing glyphs, those of dark.

Sourceval heavy_glyphs : glyphs

heavy_glyphs are heavy box-drawing glyphs.

Sourceval rounded_glyphs : glyphs

rounded_glyphs are light box-drawing glyphs with round corners.

Sourceval ascii_glyphs : glyphs

ascii_glyphs are ASCII characters, without blocks. A chart under them draws its own glyphs in ASCII; a program's glyphs, such as a rect's pattern, a dot's symbol, texts and labels, draw as given.