Sign in

    Lampese/mathplotlib/ticker/category does not have a README file

    CategoryAxis

    pub struct CategoryAxis {
    labels : Array[String]
    }

    An ordered converter from string categories to numeric axis positions.

    Categories are assigned positions in first-seen order. Repeated labels reuse the position that was assigned to their first occurrence.

    CategoryAxis::encode

    fn CategoryAxis::encode(self : CategoryAxis, values : Array[String]) -> (Array[Double], CategoryAxis)

    Convert string values to stable numeric positions. Empty strings are valid categories; the String element type rejects non-string values before this function is called.

    CategoryAxis::labels

    fn CategoryAxis::labels(self : CategoryAxis) -> Array[String]

    Return all known labels in their stable first-seen order.

    CategoryAxis::length

    fn CategoryAxis::length(self : CategoryAxis) -> Int

    Return the number of known categories.

    CategoryAxis::tick_labels

    fn CategoryAxis::tick_labels(self : CategoryAxis) -> Array[String]

    Return category labels in their stable first-seen order.

    CategoryAxis::tick_positions

    fn CategoryAxis::tick_positions(self : CategoryAxis) -> Array[Double]

    Return the numeric position for each known category.

    CategoryAxis::with_labels

    fn CategoryAxis::with_labels(self : CategoryAxis, labels : Array[String]) -> CategoryAxis

    Add labels to this converter and return the extended converter.

    category

    fn category() -> CategoryAxis

    Create an empty category converter.

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io