pub struct Boxplot<K, O> where
    O: BoxplotOrient<K, f32>, 
{ /* private fields */ }
Expand description

The boxplot element

Implementations

Create a new vertical boxplot element.

  • key: The key (the X axis value)
  • quartiles: The quartiles values for the Y axis
  • returns The newly created boxplot element
use plotters::prelude::*;

let quartiles = Quartiles::new(&[7, 15, 36, 39, 40, 41]);
let plot = Boxplot::new_vertical("group", &quartiles);

Create a new horizontal boxplot element.

  • key: The key (the Y axis value)
  • quartiles: The quartiles values for the X axis
  • returns The newly created boxplot element
use plotters::prelude::*;

let quartiles = Quartiles::new(&[7, 15, 36, 39, 40, 41]);
let plot = Boxplot::new_horizontal("group", &quartiles);

Set the style of the boxplot.

  • S: The required style
  • returns The up-to-dated boxplot element
use plotters::prelude::*;

let quartiles = Quartiles::new(&[7, 15, 36, 39, 40, 41]);
let plot = Boxplot::new_horizontal("group", &quartiles).style(&BLUE);

Set the bar width.

  • width: The required width
  • returns The up-to-dated boxplot element
use plotters::prelude::*;

let quartiles = Quartiles::new(&[7, 15, 36, 39, 40, 41]);
let plot = Boxplot::new_horizontal("group", &quartiles).width(10);

Set the width of the whiskers as a fraction of the bar width.

  • whisker_width: The required fraction
  • returns The up-to-dated boxplot element
use plotters::prelude::*;

let quartiles = Quartiles::new(&[7, 15, 36, 39, 40, 41]);
let plot = Boxplot::new_horizontal("group", &quartiles).whisker_width(0.5);

Set the element offset on the key axis.

  • offset: The required offset (on the X axis for vertical, on the Y axis for horizontal)
  • returns The up-to-dated boxplot element
use plotters::prelude::*;

let quartiles = Quartiles::new(&[7, 15, 36, 39, 40, 41]);
let plot = Boxplot::new_horizontal("group", &quartiles).offset(-5);

Trait Implementations

Actually draws the element. The key points is already translated into the image coordinate and can be used by DC directly Read more

The item in point iterator

The point iterator

framework to do the coordinate mapping

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Make the conversion

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.