Crate poloto

Crate poloto 

Source
Expand description

Plot to SVG and style with CSS

You can find poloto on github and crates.io. Documentation at docs.rs

Check out the github examples. The latest graph outputs of the examples can be found in the assets folder.

Poloto provides by default 2 impls of HasDefaultTicks for the following types:

  • i128 - decimal/scientific notation ticks.
  • f64 - decimal/scientific notation ticks.

The above types have the advantage of automatically selecting reasonable tick intervals. The user can change the formatting of the ticks while still using the ticks that were selected.

However, sometimes you may want more control on the ticks, or want to use a type other than i128/f64. One way would be to write your own function that returns a TickDistGen. Alternatively you can use the ticks::from_iter function that just takes an iterator of ticks and returns a TickDistGen. This puts more responsibility on the user to pass a decent distribution of ticks. This should only really be used when the user knows up front the min and max values of that axis. This is typically the case for at least one of the axis, typically the x axis. See step example

Modules§

build
Tools for assembling plots
num
Some impls of PlotNum and TickDistGen.
plotnum
Contains the PlotNum trait and their supporting structs.
prelude
The poloto prelude.
render
Tools to render plots
ticks
Tools to create tick distributions.
util
Misc functions.

Macros§

plots
Macro to chain multiple plots together instead of calling chain repeatedly.

Functions§

dataDeprecated
Start plotting!
frame
frame_build
header
shorthand for Header::new()