Trait poloto::plotnum::PlotNum

source ·
pub trait PlotNum: PartialOrd + Copy + Debug {
    // Required methods
    fn is_hole(&self) -> bool;
    fn scale(&self, range: &[Self; 2], max: f64) -> f64;
    fn unit_range(offset: Option<Self>) -> [Self; 2];
}
Expand description

A plottable number. In order to be able to plot a number, we need information on how to display it as well as the interval ticks.

Required Methods§

source

fn is_hole(&self) -> bool

Is this a hole value to inject discontinuty?

source

fn scale(&self, range: &[Self; 2], max: f64) -> f64

source

fn unit_range(offset: Option<Self>) -> [Self; 2]

Implementations on Foreign Types§

source§

impl PlotNum for i128

source§

fn is_hole(&self) -> bool

source§

fn scale(&self, range: &[i128; 2], max: f64) -> f64

source§

fn unit_range(offset: Option<i128>) -> [i128; 2]

source§

impl PlotNum for f64

source§

fn is_hole(&self) -> bool

source§

fn scale(&self, range: &[f64; 2], max: f64) -> f64

source§

fn unit_range(offset: Option<f64>) -> [f64; 2]

Implementors§