Sign in

    Lampese/mathplotlib/drawing does not have a README file

    BandInfo

    pub struct BandInfo {
    lower : Double
    upper : Double
    horizontal : Bool
    stacked : Bool
    } derive(Eq,
    Debug
    )

    Bounds at the selected original area sample, retaining their input direction. Horizontal bands are sampled at data_y; vertical bands at data_x. A stacked area's HitInfo.value is the original series value, rather than a subtraction of its accumulated bounds. For other bands it is the second bound.

    BandInfo::equal

    fn BandInfo::equal(BandInfo, BandInfo) -> Bool

    BandInfo::not_equal

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

    BandInfo::to_repr

    BoxInfo

    pub struct BoxInfo {
    group_index : Int
    q1 : Double
    median : Double
    q3 : Double
    lower_whisker : Double
    upper_whisker : Double
    part : BoxPart
    } derive(Eq,
    Debug
    )

    A scalar snapshot of one original zero-based boxplot group. No source arrays or mutable BoxStats collections are retained by an interactive frame.

    BoxInfo::equal

    fn BoxInfo::equal(BoxInfo, BoxInfo) -> Bool

    BoxInfo::not_equal

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

    BoxInfo::to_repr

    BoxPart

    pub(all) enum BoxPart {
    Box
    LowerWhisker
    UpperWhisker
    LowerCap
    UpperCap
    Outlier(Double)
    } derive(Eq,
    Debug
    )

    The visible component of a box-and-whisker plot. Outlier carries the original outlier value; other parts share their group's summary statistics.

    BoxPart::equal

    fn BoxPart::equal(BoxPart, BoxPart) -> Bool

    BoxPart::not_equal

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

    BoxPart::to_repr

    CellInfo

    pub struct CellInfo {
    row : Int
    column : Int
    x_range : (Double, Double)
    y_range : (Double, Double)
    } derive(Eq,
    Debug
    )

    Original zero-based matrix indices and the cell's data-space intervals. Intervals retain their source orientation, including reversed extents.

    CellInfo::equal

    fn CellInfo::equal(CellInfo, CellInfo) -> Bool

    CellInfo::not_equal

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

    CellInfo::to_repr

    Drawing

    pub struct Drawing {
    // private fields
    }

    A prepared SVG snapshot with immutable semantic hit targets and no UI types.

    Drawing::height

    fn Drawing::height(self : Drawing) -> Int

    Drawing::hit_info

    fn Drawing::hit_info(self : Drawing, point : HitPoint) -> HitInfo?

    Look up metadata by exact point equality within this prepared frame.

    Drawing::hit_test

    fn Drawing::hit_test(self : Drawing, x : Double, y : Double, radius? : Double, mode? : HitMode) -> HitPoint?

    Hit-test intrinsic drawing coordinates. Areas win in reverse paint order, with visible error-bar/box-plot strokes and outliers above an area selectable; point anchors and clipped segments use radius and stable distance ties. XNearest prioritizes nearby non-line/error points, then selects real line or error-bar samples by screen X inside the panel. Legacy drawings without semantic targets retain nearest-point behavior.

    Drawing::hit_test_client

    fn Drawing::hit_test_client(self : Drawing, client_x : Double, client_y : Double, left : Double, top : Double, width : Double, height : Double, radius? : Double, mode? : HitMode) -> HitPoint?

    Hit-test client coordinates with a radius measured in CSS pixels.

    Drawing::points

    fn Drawing::points(self : Drawing) -> Array[HitPoint]

    Return a copy; mutating it cannot change this drawing's hit targets.

    Drawing::svg

    fn Drawing::svg(self : Drawing) -> String

    Drawing::targets

    fn Drawing::targets(self : Drawing) -> Array[HitTarget]

    Return an independent array; target values contain no mutable collections.

    Drawing::viewport_point

    fn Drawing::viewport_point(self : Drawing, client_x : Double, client_y : Double, left : Double, top : Double, width : Double, height : Double) -> (Double, Double)?

    Convert client coordinates for an SVG viewBox="0 0 width height" with preserveAspectRatio="xMidYMid meet". Outside and letterbox hits are absent. The rectangle must be the actual SVG viewport's client rectangle.

    Drawing::width

    fn Drawing::width(self : Drawing) -> Int

    ErrorInfo

    pub struct ErrorInfo {
    x_range : (Double, Double)
    y_range : (Double, Double)
    } derive(Eq,
    Debug
    )

    Original symmetric error bounds in data coordinates. A disabled or zero error direction has equal endpoints; ranges are independent of viewport, axis inversion and the domain-valid error segments actually visible.

    ErrorInfo::equal

    fn ErrorInfo::equal(ErrorInfo, ErrorInfo) -> Bool

    ErrorInfo::not_equal

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

    HitInfo

    pub struct HitInfo {
    point : HitPoint
    kind : HitKind
    series : String
    category : String?
    value : Double
    interval : (Double, Double)?
    fraction : Double?
    cell : CellInfo?
    error : ErrorInfo?
    band : BandInfo?
    box : BoxInfo?
    } derive(Eq,
    Debug
    )

    Semantic values captured with the same immutable frame as its hit point.

    HitInfo::equal

    fn HitInfo::equal(HitInfo, HitInfo) -> Bool

    HitInfo::not_equal

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

    HitInfo::to_repr

    HitKind

    pub(all) enum HitKind {
    Line
    Scatter
    Bar
    BarH
    Histogram
    Histogram2D
    Pie
    Heatmap
    ErrorBar
    Area
    BoxPlot
    } derive(Eq,
    Debug
    )

    The plotted primitive described by a hit target.

    HitKind::equal

    fn HitKind::equal(HitKind, HitKind) -> Bool

    HitKind::not_equal

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

    HitKind::to_repr

    HitMode

    pub(all) enum HitMode {
    Nearest
    XNearest
    } derive(Eq,
    Debug
    )

    XNearest falls back to a real line/error-bar sample nearest in screen X inside a panel.

    HitMode::equal

    fn HitMode::equal(HitMode, HitMode) -> Bool

    HitMode::not_equal

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

    HitMode::to_repr

    HitPoint

    pub struct HitPoint {
    panel_index : Int
    artist_index : Int
    point_index : Int
    data_x : Double
    data_y : Double
    screen_x : Double
    screen_y : Double
    } derive(Eq,
    Debug
    )

    A data-point anchor and its intrinsic drawing coordinates. Indices identify a point within this frame's panel and artist ordering.

    HitPoint::equal

    fn HitPoint::equal(HitPoint, HitPoint) -> Bool

    HitPoint::not_equal

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

    HitPoint::to_repr

    HitShape

    pub(all) enum HitShape {
    Point
    Segment(Double, Double, Double, Double)
    Rectangle(Double, Double, Double, Double)
    Sector(Double, Double, Double, Double, Double)
    AnnularSector(Double, Double, Double, Double, Double, Double)
    Quadrilateral(Double, Double, Double, Double, Double, Double, Double, Double)
    } derive(Eq,
    Debug
    )

    Intrinsic drawing geometry. Rectangles use left, top, width, height. Sectors use center X/Y, radius, start degrees and positive CCW sweep degrees; angles follow mathematical coordinates, with the screen Y direction reversed. Nonpositive sizes/sweeps and nonfinite geometry do not hit; rectangle and sector edges are included, and sweeps of at least 360 degrees are full circles. Annular sectors use center X/Y, inner radius, outer radius, start and sweep. Inner/outer edges are included; a positive inner radius excludes the hole. Quadrilaterals list four consecutive vertices, with included edges and an even-odd interior. They retain only immutable numeric coordinates.

    HitShape::equal

    fn HitShape::equal(HitShape, HitShape) -> Bool

    HitShape::not_equal

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

    HitShape::to_repr

    HitTarget

    pub struct HitTarget {
    info : HitInfo
    shape : HitShape
    bounds : (Double, Double, Double, Double)
    } derive(Eq,
    Debug
    )

    A hit geometry and the displayed panel rectangle that clips it.

    HitTarget::equal

    fn HitTarget::equal(HitTarget, HitTarget) -> Bool

    HitTarget::not_equal

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

    band_info

    fn band_info(lower : Double, upper : Double, horizontal? : Bool, stacked? : Bool) -> BandInfo

    box_info

    fn box_info(group_index : Int, q1~ : Double, median~ : Double, q3~ : Double, lower_whisker~ : Double, upper_whisker~ : Double, part? : BoxPart) -> BoxInfo

    cell_info

    fn cell_info(row : Int, column : Int, x_range : (Double, Double), y_range : (Double, Double)) -> CellInfo

    drawing

    fn drawing(width : Int, height : Int, svg : String, points : Array[HitPoint], targets? : Array[HitTarget], exclusions? : Array[(Int, (Double, Double, Double, Double))]) -> Drawing

    Capture independent copies of point, semantic-target and exclusion arrays. Exclusions are (panel index, intrinsic left/top/width/height) overlay rectangles.

    error_info

    fn error_info(x_range : (Double, Double), y_range : (Double, Double)) -> ErrorInfo

    hit_info

    fn hit_info(point : HitPoint, kind : HitKind, value~ : Double, series? : String, category? : String?, interval? : (Double, Double)?, fraction? : Double?, cell? : CellInfo?, error? : ErrorInfo?, band? : BandInfo?, box? : BoxInfo?) -> HitInfo

    hit_point

    fn hit_point(panel_index : Int, artist_index : Int, point_index : Int, data_x : Double, data_y : Double, screen_x : Double, screen_y : Double) -> HitPoint

    hit_target

    fn hit_target(info : HitInfo, shape : HitShape, bounds : (Double, Double, Double, Double)) -> HitTarget