Module Hugin.Role
Roles.
A role is a mark's slot for a channel (Roles). It is identified by its name, and a parameter (Role.param) by its name and the call that made it.
type ('d, 'r) tThe type for roles taking channels of domain values 'd and range 'r.
Positions
Appearance
Facets
Values
value ~name is the role name whose values are the quantities of its channel as they are, nan where missing: it reads no scale, contributes to no domain and yields no guide, so a channel given to it has neither a scale nor a title (Mark.v). It gives a draw function values that are neither positions nor colours, such as a cart's angle.
Raises Invalid_argument if name is empty or is the name of a role above.
param ~name ~equal is a new role name for a parameter of a mark, a value of any type: its domain unit holds no data, so only const binds it, and Mark.get gives the constant once per row. It reads no scale, contributes to no domain and yields no guide. Figure equality (equal) compares its constants with equal, so a mark that keeps a curve or a tensor this way is equal to itself rebuilt.
Each call makes another role, which Mark.get does not confuse with one of the same name, and which makes a mark unequal to one made with another: a mark makes its parameters once, at the top level.
Raises Invalid_argument if name is empty or is the name of a role above.