alias aes = tuple
Map data fields to "aesthetic" fields understood by the ggplotd geom functions
The most commonly used aesthetic fields in ggplotd are "x" and "y". Which further data fields are used/required depends on the geom function being called.
Other common fields:
<ul><li>"colour": Identifier for the colour. In general data points with different colour ids get different colours. This can be almost any type. You can also specify the colour by name or cairo.Color type if you want to specify an exact colour (any type that isNumeric, cairo.Color.RGB(A), or can be converted to string)</li>
<li>"size": Gives the relative size of points/lineWidth etc.</li>
<li>"label": Text labels (string)</li>
<li>"angle": Angle of printed labels in radians (double)</li>
<li>"alpha": Alpha value of the drawn object (double)</li>
<li>"mask": Mask the area outside the axes. Prevents you from drawing outside of the area (bool)</li>
<li>"fill": Whether to fill the object/holds the alpha value to fill with (double).</li></ul>
In practice aes is an alias for std.typecons.tuple.
Examples
struct Diamond
{
string clarity = "SI2";
double carat = 0.23;
double price = 326;
}
Diamond diamond;
auto mapped = aes!("colour", "x", "y")(diamond.clarity, diamond.carat, diamond.price);
assert(mapped.colour == "SI2");
assert(mapped.x == 0.23);
assert(mapped.y == 326);
public static auto auto DefaultValues
Default values for most settings
public auto fieldWithDefault(alias field, AES, T)(
AES aes,
T theDefault)
Returns field if it exists, otherwise uses the passed default
alias mergeRange = ggplotd.range.mergeRange
Deprecated
Moved to ggplotd.range;
Aliases
aes |
| Map data fields to "aesthetic" fields understood by the ggplotd geom functions |
mergeRange |
|
Variables
DefaultValues |
| Default values for most settings |
Functions
autofieldWithDefault | Returns field if it exists, otherwise uses the passed default |
Structs
Pixel | Number of pixels | |
DataID | DataID is used to refer represent any type as a usable type |
Templates
Aes | Aes is used to store and access data for plotting | |
group | Groups data by colour label etc. | |
merge | Merge two types by their members. |