Sign in

    Lampese/mathplotlib/core does not have a README file

    DataError

    pub(all) suberror DataError {
    LengthMismatch(expected~ : Int, actual~ : Int)
    NonFiniteLimit(axis~ : String)
    InvalidErrorBar(message~ : String)
    InvalidBins
    InvalidImage(message~ : String)
    InvalidPie(message~ : String)
    InvalidBoxPlot(message~ : String)
    InvalidQuiver(message~ : String)
    InvalidViolin(message~ : String)
    InvalidContour(message~ : String)
    InvalidAnnotation(message~ : String)
    InvalidReference(message~ : String)
    InvalidStreamplot(message~ : String)
    InvalidStatistics(message~ : String)
    InvalidTicks(message~ : String)
    InvalidCollection(message~ : String)
    }

    Errors raised when constructing a data series.

    MaskError

    pub(all) suberror MaskError {
    InvalidShape(message~ : String)
    }

    Errors raised when constructing an explicitly masked array.

    Bounds

    pub struct Bounds {
    xmin : Double
    xmax : Double
    ymin : Double
    ymax : Double
    }

    Explicit data limits. When omitted, a figure computes limits from its plots.

    Bounds::is_finite

    fn Bounds::is_finite(self : Bounds) -> Bool

    Whether all four limits are finite numbers.

    Bounds::xmax

    fn Bounds::xmax(self : Bounds) -> Double

    Return the upper x limit.

    Bounds::xmin

    fn Bounds::xmin(self : Bounds) -> Double

    Return the lower x limit.

    Bounds::ymax

    fn Bounds::ymax(self : Bounds) -> Double

    Return the upper y limit.

    Bounds::ymin

    fn Bounds::ymin(self : Bounds) -> Double

    Return the lower y limit.

    LegendPosition

    pub(all) enum LegendPosition {
    UpperRight
    UpperLeft
    LowerRight
    LowerLeft
    } derive(Eq,
    Debug
    )

    The corner of an axes panel used to anchor its legend box. Shared by the public scene API and output backends.

    LegendPosition::equal

    LegendPosition::not_equal

    fn LegendPosition::not_equal(x : LegendPosition, y : LegendPosition) -> Bool

    Limits

    pub struct Limits {
    lower : Double
    upper : Double
    }

    An ordered pair of axis limits. The direction is preserved, so reversed limits represent an inverted axis.

    Limits::is_finite

    fn Limits::is_finite(self : Limits) -> Bool

    Whether both limits are finite numbers.

    Limits::lower

    fn Limits::lower(self : Limits) -> Double

    Return the first limit exactly as supplied.

    Limits::upper

    fn Limits::upper(self : Limits) -> Double

    Return the second limit exactly as supplied.

    LineStroke

    pub struct LineStroke {
    // private fields
    }

    Immutable effective Line stroke appearance. Dash arrays are copied at both construction and inspection, so an old Style remains a stable snapshot.

    LineStroke::dash_offset

    fn LineStroke::dash_offset(self : LineStroke) -> Double

    LineStroke::dash_sequence

    fn LineStroke::dash_sequence(self : LineStroke) -> Array[Double]?

    LineStroke::linestyle

    fn LineStroke::linestyle(self : LineStroke) -> String

    MaskedArray

    pub struct MaskedArray {
    // private fields
    }

    A one-dimensional floating-point array with an explicit boolean mask.

    Masked values remain in values so callers can preserve source data, while plotting adapters use to_array to replace masked entries with NaN.

    MaskedArray::all_masked

    fn MaskedArray::all_masked(self : MaskedArray) -> Bool

    Whether every entry is explicitly masked.

    MaskedArray::compressed

    fn MaskedArray::compressed(self : MaskedArray) -> Array[Double]

    Return unmasked entries in their original order.

    MaskedArray::count

    fn MaskedArray::count(self : MaskedArray) -> Int

    Number of entries that are not explicitly masked.

    MaskedArray::filled

    fn MaskedArray::filled(self : MaskedArray, fill_value : Double) -> Array[Double]

    Replace masked entries with fill_value and return an independent array.

    MaskedArray::finite_values

    fn MaskedArray::finite_values(self : MaskedArray) -> Array[Double]

    Return finite and unmasked entries in their original order.

    MaskedArray::is_masked

    fn MaskedArray::is_masked(self : MaskedArray, index : Int) -> Bool

    Whether the entry at index is explicitly masked.

    MaskedArray::length

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

    Number of entries in a masked array.

    MaskedArray::map

    fn MaskedArray::map(self : MaskedArray, f : (Double) -> Double) -> MaskedArray

    Apply a function while preserving the mask and masking invalid results.

    MaskedArray::mask

    fn MaskedArray::mask(self : MaskedArray) -> Array[Bool]

    Return a copy of the explicit boolean mask.

    MaskedArray::to_array

    fn MaskedArray::to_array(self : MaskedArray) -> Array[Double]

    Convert masked entries to NaN, the representation consumed by plotters.

    MaskedArray::values

    fn MaskedArray::values(self : MaskedArray) -> Array[Double]

    Return a copy of the source values, including values that are masked.

    MaskedArray::zip_map

    fn MaskedArray::zip_map(self : MaskedArray, other : MaskedArray, f : (Double, Double) -> Double) -> MaskedArray raise DataError

    Combine two masked arrays elementwise. The result mask is the OR of both masks and any invalid result.

    MaskedMatrix

    pub struct MaskedMatrix {
    // private fields
    }

    A rectangular two-dimensional floating-point array with an explicit mask.

    MaskedMatrix::columns

    fn MaskedMatrix::columns(self : MaskedMatrix) -> Int

    Number of matrix columns.

    MaskedMatrix::count

    fn MaskedMatrix::count(self : MaskedMatrix) -> Int

    Number of unmasked matrix cells.

    MaskedMatrix::filled

    fn MaskedMatrix::filled(self : MaskedMatrix, fill_value : Double) -> Array[Array[Double]]

    Replace masked cells with fill_value and return a deep copy.

    MaskedMatrix::finite_values

    fn MaskedMatrix::finite_values(self : MaskedMatrix) -> Array[Double]

    Return finite and unmasked cells in row-major order.

    MaskedMatrix::is_masked

    fn MaskedMatrix::is_masked(self : MaskedMatrix, row : Int, column : Int) -> Bool

    Whether one matrix cell is explicitly masked.

    MaskedMatrix::map

    fn MaskedMatrix::map(self : MaskedMatrix, f : (Double) -> Double) -> MaskedMatrix

    Apply a function elementwise while preserving and extending the mask.

    MaskedMatrix::mask

    fn MaskedMatrix::mask(self : MaskedMatrix) -> Array[Array[Bool]]

    Return a deep copy of the explicit mask matrix.

    MaskedMatrix::rows

    fn MaskedMatrix::rows(self : MaskedMatrix) -> Int

    Number of matrix rows.

    MaskedMatrix::to_array

    fn MaskedMatrix::to_array(self : MaskedMatrix) -> Array[Array[Double]]

    Convert masked cells to NaN for plotting adapters.

    MaskedMatrix::values

    fn MaskedMatrix::values(self : MaskedMatrix) -> Array[Array[Double]]

    Return a deep copy of the source matrix.

    Point

    pub struct Point {
    x : Double
    y : Double
    }

    A point in the data coordinate system.

    Point::is_finite

    fn Point::is_finite(self : Point) -> Bool

    Whether both coordinates are finite numbers.

    Point::is_missing

    fn Point::is_missing(self : Point) -> Bool

    Whether the point is a missing sample for plotting purposes.

    Point::x

    fn Point::x(self : Point) -> Double

    Return the x coordinate of a point.

    Point::y

    fn Point::y(self : Point) -> Double

    Return the y coordinate of a point.

    Series

    pub struct Series {
    xs : Array[Double]
    ys : Array[Double]
    }

    Paired x/y samples with a length invariant.

    Series::finite_bounds

    fn Series::finite_bounds(self : Series) -> Bounds?

    Compute limits from finite samples only.

    Series::length

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

    Number of samples in a series.

    Series::points

    fn Series::points(self : Series) -> Array[Point]

    Convert paired samples to points without dropping missing values.

    Series::x

    fn Series::x(self : Series) -> Array[Double]

    Return the x samples in their original order, including non-finite values.

    Series::y

    fn Series::y(self : Series) -> Array[Double]

    Return the y samples in their original order, including non-finite values.

    Style

    pub struct Style {
    color : String
    width : Double
    radius : Double
    fill : String
    font_size : Double
    marker : String
    // private fields
    }

    Styling shared by line, scatter, and bar plots.

    Style::color

    fn Style::color(self : Style) -> String

    Return the color of a style.

    Style::fill

    fn Style::fill(self : Style) -> String

    Return the fill color of a style.

    Style::font_size

    fn Style::font_size(self : Style) -> Double

    Return the font size used by text artists.

    Style::line_alpha

    fn Style::line_alpha(self : Style) -> Double?

    Optional alpha used by Line strokes; other Artist consumers are unchanged.

    Style::line_gapcolor

    fn Style::line_gapcolor(self : Style) -> String?

    Optional raw gap color for native Line handles; other Artists are unchanged.

    Style::line_stroke

    fn Style::line_stroke(self : Style) -> LineStroke

    Effective appearance for Line strokes; other Artist consumers are unchanged.

    Style::marker

    fn Style::marker(self : Style) -> String

    Return the marker shape used by marker artists.

    Style::radius

    fn Style::radius(self : Style) -> Double

    Return the marker radius of a style.

    Style::width

    fn Style::width(self : Style) -> Double

    Return the line width of a style.

    bounds

    fn bounds(xmin : Double, xmax : Double, ymin : Double, ymax : Double) -> Bounds

    Construct explicit data limits.

    bounds_from_points

    fn bounds_from_points(points : Array[Point]) -> Bounds?

    Compute limits from finite points only. Missing points are ignored.

    limits

    fn limits(lower : Double, upper : Double) -> Limits

    Construct axis limits without reordering or padding them.

    line_stroke

    fn line_stroke(canonical : String, offset? : Double, dashes? : Array[Double]?) -> LineStroke

    Construct an effective stroke from an already canonical linestyle. This low-level appearance carrier does not reconstruct Line setter history.

    masked_array

    fn masked_array(values : Array[Double], mask? : Array[Bool]) -> MaskedArray raise MaskError

    Construct a masked array. An omitted mask means that every value is initially unmasked; an explicit mask must have the same length as values.

    masked_matrix

    fn masked_matrix(values : Array[Array[Double]], mask? : Array[Array[Bool]]) -> MaskedMatrix raise MaskError

    Construct a rectangular masked matrix. An omitted mask leaves every cell unmasked; an explicit mask must have the same rectangular shape as values.

    point

    fn point(x : Double, y : Double) -> Point

    Construct a data point.

    series

    fn series(xs : Array[Double], ys : Array[Double]) -> Series raise DataError

    Construct a series. The two input arrays must have the same length.

    style

    fn style(color : String, width? : Double, radius? : Double, fill? : String, font_size? : Double, marker? : String, line_alpha? : Double?, line_stroke? : LineStroke, line_gapcolor? : String?) -> Style

    Construct a line or marker style.