Transforms the plot data. Many functions in this package require a specific
data format to align observations, plot_data() helps reformat data frames
as needed.
plot_data(data, inherit = FALSE)A function to transform the plot data before rendering, referred
to as plot_data. Acceptable values include:
NULL: No action taken.
waiver(): Inherits from the parent layout.
A function or purrr-style formula: Used to transform the plot data,
which should accept a data frame and return a data frame. You can apply
this after the parent layout plot_data function, using the inherit
argument.
Use this hook to modify the data for all geoms after the layout is created
(for matrix data, it has been melted to a long format data frame) but before
rendering by ggplot2. The returned data must be a data frame for ggplot.
A single boolean value indicates whether to apply the parent
plot_data first and then apply the specified plot_data for the plot.
Defaults to FALSE.
Defaults will attempt to inherit from the parent layout if the actual data is
inherited from the parent layout, with one exception: align_dendro(), which
will not inherit the plot_data by default.