
Add a layer to a pmx_vpc_plot with a facet warning
Source: R/pmx_vpc_plot_class.R
plus-.pmx_vpc_plot.RdS3 method for + applied to objects returned by plot_vpc_cont(),
plot_vpc_cens(), and plot_build_vpc(). Delegates to the standard ggplot2 + operation for all
layer types. When e2 is a ggplot2::facet_wrap() or ggplot2::facet_grid()
specification, a warning is issued because the VPC summary statistics are
pre-computed and will not reflect the added stratification.
Use strat_var in plot_vpc_cont(), plot_vpc_cens(), or df_vpcstats()
to stratify both statistics and panels.
Facets inside a list() are caught the same way. restyle_plot() and
reveal() keep the pmx_vpc_plot class, and reveal(as = "facet") and
restyle_plot(facet = ) warn like + facet_*().
The pmx_vpc_plot class is preserved on the result so that subsequent +
calls are also intercepted.
Usage
# S3 method for class 'pmx_vpc_plot'
e1 + e2
# S3 method for class 'pmx_vpc_plot'
restyle_plot(p, ...)
# S3 method for class 'pmx_vpc_plot'
reveal(p, col, ..., as = NULL, on = NULL)Arguments
- e1
A
pmx_vpc_plotobject.- e2
A ggplot2 layer, scale, theme, facet, or other addable object.
- p
A
pmx_vpc_plotobject.- col, as, on, ...
Passed to the ggstylekit
reveal()orrestyle_plot()method.