plot_fits: Plot 2D and 1D fits altogether.

View source: R/plot_fits.R

plot_fitsR Documentation

Plot 2D and 1D fits altogether.

Description

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.

Usage

plot_fits(x, ...)

Arguments

x

An object of class vb_bmm.

...

Extra parameters for plot_2D and plot_1D functions.

Value

A figure assembled with ggpubr.

Examples

data(fit_mvbmm_example)
plot_fits(fit_mvbmm_example)

\donotrun{

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)
}

caravagn/VIBER documentation built on July 16, 2022, 1:23 a.m.