Description Usage Arguments Details Value
glyph turns an ordinary layer into a set of glyphs. Each glyph is a plot that inherits the mappings, stat, and parameters of the initial layer. The mappings and stat for each glyph are keyed to a subset of the layer's data. The data is divided into subsets according to the glyph.by variable. Each subset is represented by one glyph. Glyphs are mapped to a pair of major x and y axes by major.aes. To allow interpretation, these major axes should correspond to the x and y aesthetics for any other layers in the plot.
1 2 3 4 5 |
layer |
a ggplot2 layer object. See
|
major.aes |
An aesthetic mapping, usually
constructed with |
glyph.by |
variables to split the layer's data by,
stored as a character vector. Similar to .variables in
|
width |
numeric or rel object. The width of each
glyph. If width is numeric, the glyph will be drawn with
a width equal to width units on the x axis. If width is
of class |
height |
numeric or rel object. The height of each glyph. Height behaves the same way as width, but applies to the y dimension. |
x_scale |
function. The scaling to use for the x
axis within each glyph. If x_scale equals
|
y_scale |
function. y_scale behaves the same as x_scale but controls the scales for the y axis within each glyph. |
merge.overlaps |
logical. If TRUE sets of glyphs that are connected by overlapping boundaries will be merged and plotted as a single glyph. This new glyph combines the data of the overlapping glyphs and is plotted in the centered location of the glyphs (maen x and y values). |
reference |
function. Function used to create
reference objects for glyphs. If NULL, no reference
objects are used. Reference objects are plotted on a
layer beneath the glyphs. They provide a consistent frame
of reference to aid comparisons between the glyphs.
Functions that create reference objects include
|
ply.aes |
logical. If TRUE (default) aesthetics are
calculated separately for each group, as with
|
.ref |
internal argument used for plotting reference objects. |
Glyphed layers follow usual data inheritence rules for
ggplot2 layer objects. If a layer contains no data, glyph
will use the global data set for the plot. This is the
data set specified in ggplot
.
an object of class glayer
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.