Facets across multiple panels can be created from an existing loonplot via l_facet
or
directly at the time of the original loon plot call (without constructing the unfacetted loon plot itself).
loonFacets
is that helper function called by the various loon plot creation function
(e.g., l_plot
, l_hist
, etc.). at the time of their creation to
produce the facets. It should rarely be called directly by the user.
The function makes use of the general loonPlotFactory
interface to tcl.
For detailed information on its common arguments, see the arguments of l_facet
or those of the
loon plot constructor (e.g., l_plot
, etc.)
loonFacets(
type,
by,
args,
on,
bySubstitute,
layout = "grid",
connectedScales = "both",
byArgs,
linkingGroup,
sync,
parent,
factory_tclcmd,
factory_path,
factory_window_title,
xlabel = "",
ylabel = "",
title = "",
modifiedLinkedStates = character(0L),
...
)
the class name of the loon plot
loon plot can be separated by some variables into mutiple panels.
This argument can take a vector
, a list
of same lengths or a data.frame
as input.
named list of N-dimensional arguments (e.g., x, y, selected, etc.)
if the by
is a formula, an optional data frame containing the variables in the by
.
If variables in by
is not found in data, the variables are taken from environment(formula),
typically the environment from which the function is called.
effectively a call of substitute(by)
on the by
arguments
used to generate warnings or errors.
layout facets as 'grid'
, 'wrap'
or 'separate'
Determines how the scales of the facets are to be connected depending
on which layout
is used. For each value of layout
, the scales are connected
as follows:
layout = "wrap":
Across all facets, when connectedScales
is
"x"
, then only the "x" scales are connected
"y"
, then only the "y" scales are connected
"both"
, both "x" and "y" scales are connected
"none"
, neither "x" nor "y" scales are connected.
For any other value, only the "y" scale is connected.
layout = "grid":
Across all facets, when connectedScales
is
"cross"
, then only the scales in the same row and the same column are connected
"row"
, then both "x" and "y" scales of facets in the same row are connected
"column"
, then both "x" and "y" scales of facets in the same column are connected
"x"
, then all of the "x" scales are connected (regardless of column)
"y"
, then all of the "y" scales are connected (regardless of row)
"both"
, both "x" and "y" scales are connected in all facets
"none"
, neither "x" nor "y" scales are connected in any facets.
further arguments to be used in determining how by
will be used.
the string naming the group of plots to be linked to the facets.
string identifying how to synchronize the aesthetics with linked plots (i.e., "push" or "pull", "pull" by default).
the parent loon widget
the tcl command to be given to loonPlotFactory. For example, the loon histogram tcl command is the string '::loon::histogram'
the tcl path given to loonPlotFactory to identify the widgets; for example, the string 'hist' to prefix histograms.
the window title to be given to loonPlotFactory to better identify the window for the user; for example, the string 'loon histogram'.
string to label the x direction of the facets
string to label the y direction of the facets
string providing a title for the collection of facets
states of the plot to be synchronized with plots
in the same linking group. Used with sync = "push"
.
named arguments to modify the `loon` widget states
l_facet
and, for example, l_plot
, l_hist
, l_serialaxes