package matrix
Module Matrix_charts.LayoutSource
The type for figures laid out in a region.
plot l is l's plot.
value l n c is the value of scale n at the middle of cell c, or the category whose band holds it, and None if c is outside the plot.
Raises Invalid_argument if n is not a position scale of l.
position l n v is the column, or for a y scale the row of cells, of v on scale n, clamped to the plot, and for a category its band's middle.
Raises Invalid_argument if n is not a position scale of l, or v is not one of its values.
domain l n is the shown domain [Num lo; Num hi] of scale n, or its categories.
Raises Invalid_argument if n is not a position scale of l.
zoom l ~at k is l's view with the shown domain of each continuous position scale on axes, `Both by default, k times narrower about its value at cell at, or at the plot's nearest cell if at is outside it. A layout of the new view whose plot has the same place shows that value at at.
Raises Invalid_argument if k is not finite and positive.
pan l ~by:(dx, dy) is l's view in which the data drawn at cell (x, y) is drawn at (x + dx, y + dy). For a drag, by is the pointer's move in cells since the previous event.
hit l c is the row whose mark inked cell c last. When no mark inked c, it is the row that inked last the nearest cell within radius, 3. by default, the later mark's of two at one distance, and None if there is none or c is outside the plot. Distances are in columns. `Euclidean, the default, counts a row of cells as Theme.t.aspect columns. `X keeps the cells within radius columns and adds a hundredth of the vertical distance, which breaks ties, and `Y the converse. It inks the marks again, so it costs about a draw.
legend l is the category, color and glyph of every legend entry of l, for a program that draws a legend itself.