Skip to content

AxisPosition

Mojo struct 🡭

AxisPosition

@memory_only
struct AxisPosition

Aliases

  • EDGE = AxisPosition(Int(0)): At the edge of the plot rect: the bottom for the x-axis, the left for the y-axis. The default, and what every chart did before.
  • ZERO = AxisPosition(Int(1)): At zero on the axis it is positioned along, so the line crosses the data instead of bounding it. Falls back to EDGE, rather than drawing a line outside the plot rect, unless that axis is continuous and its domain spans zero. So a categorical or polar chart ignores this, and so does a scatter whose values are all positive.

Implemented traits

AnyType, Copyable, Deinitable, ImplicitlyCopyable, Movable

Methods

__init__

fn def __init__(out self, value: Int)

Args:

  • value (Int)
  • self (Self)

Returns:

Self

__eq__

fn def __eq__(self, other: Self) -> Bool

Args:

  • self (Self)
  • other (Self)

Returns:

Bool