packages

plot::ops

On this page

Operators. +, | and / need nothing: a + b overlays two Axes, a | b puts them side by side and a / b stacks them. This module adds ↦ ("maps to") for naming the columns of a table to plot, x first: "date" ↦ "price" reads as the function it draws. It binds like ==, below arithmetic and |.

Structs

FormulaSource

pub struct Formula

Which column goes on which axis: x ↦ y.

nabi
let f = "date" ↦ "price";
assert(f.x == "date" && f.y == "price");

Traits

MapsToSource

pub trait MapsTo

The ↦ operator.

nabi
use plot::ops::MapsTo;

assert(("t" ↦ "v").y == "v");
  • fn maps_to(self, y: str) -> Formula§

    Source

    x ↦ y: plot column y against column x.