[][src]Module plotters_unstable::coord

One of the key features of Plotters is flexible coordinate system abstraction and this module provides all the abstraction used for the coordinate abstarction of Plotters.

Generally speaking, the coordinate system in Plotters is responsible for mapping logic data points into pixel based backend coordinate. This task is abstracted by a simple trait called CoordTranslate. Please note CoordTranslate trait doesn't assume any property about the coordinate values, thus we are able to extend Plotters's coordinate system to other types of coorindate easily.

Another important trait is ReverseCoordTranslate. This trait allows some coordinate retrieve the logic value based on the pixel-based backend coordinate. This is particularly interesting for interactive plots.

Plotters contains a set of pre-defined coordinate specifications that fulfills the most common use. See documentation for module types for details about the basic 1D types.

The coordinate system also can be tweaked by the coordinate combinators, such as logarithmic coordinate, nested coordinate, etc. See documentation for module combinators for details.

Currently we support the following 2D coordinate system:

  • 2-dimensional Cartesian Coordinate: This is done by the combinator Cartesian2d.

Modules

cartesian

The 2-dimensional cartesian coordinate system.

combinators

The coordinate combinators

ranged1d

The one-dimensional coordinate system abstraction.

types

The primitive types supported by Plotters coordinate system

Structs

Shift

The coordinate translation that only impose shift

Traits

CoordTranslate

The trait that translates some customized object to the backend coordinate

ReverseCoordTranslate

The trait indicates that the coordinate system supports reverse transform This is useful when we need an interactive plot, thus we need to map the event from the backend coordinate to the logical coordinate