fun as_discrete(variable: String, label: String? = null): MappingMeta
Marks a numeric variable as categorical. The plot will use a discrete scale for the aesthetic mapping. It is similar to the factor() function from R but works differently - there is no data transformation.
variable
- string
The name of the variable
label
- string
The name of the scale - used as the axis label or the legend title