The OpenD Programming Language

geomType

Draw any type of geom

The type field is required, which should be a string. Any of the geom* functions in ggplotd.geom can be passed using a lower case string minus the geom prefix, i.e. hist2d calls geomHist2D etc.

template geomType(AES)
geomType
(
AES aes
)

Members

Functions

geomType
auto geomType(AES aes)

Draw any type of geom

Examples

import ggplotd.geom : geomType;
geomType(Aes!(double[], "x", double[], "y", string[], "type")
    ( [0.0,1,2], [5.0,6,7], ["line", "point", "line"] ));
import std.range : walkLength;
assertEqual(
        geomType(Aes!(double[], "x", double[], "y", string[], "type")
            ( [0.0,1,2], [5.0,6,7], ["line", "point", "line"] )).walkLength, 2
        );

Meta