Performs a joint plot in which both the clustering scatter and the
marginal plots are repreoduced. This function uses the plot_2D
and
plot_1D
functions to create all the required plots, and the ellipsis
is used to forward parameters to both functions.
plot_fits(x, ...)
An object of class vb_bmm.
Extra parameters for plot_2D
and plot_1D
functions.
A figure assembled with ggpubr
.
data(fit_mvbmm_example)
plot_fits(fit_mvbmm_example)
#> Error in loadNamespace(x): there is no package called ‘ggpubr’
{
require(dplyr)
colors_clusters = fit_mvbmm_example$labels %>% unique %>% pull()
colors_clusters_samples = ggsci::pal_lancet()(colors_clusters %>% length())
names(colors_clusters_samples) = colors_clusters
plot_fits(fit_mvbmm_example, colors = colors_clusters_samples)
}
#> Loading required package: dplyr
#>
#> Attaching package: ‘dplyr’
#> The following objects are masked from ‘package:stats’:
#>
#> filter, lag
#> The following objects are masked from ‘package:base’:
#>
#> intersect, setdiff, setequal, union
#> Error in loadNamespace(x): there is no package called ‘ggsci’