Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

bind_plots

Bind Multiple ggplot Objects


Description

This is an aesthetically efficient implementation of the grid.arrange

Usage

bind_plots(..., byrow = FALSE)

Arguments

...

(ggplot) ggplot objects to combine.

byrow

(logical) if FALSE (the default) the plots are bind by columns, otherwise the plots are bind by rows.

Value

(gtable) A plottable object with plot().

Author(s)

Examples

library("DALEX")
library("ingredients")

titanic_glm <- glm(survived ~ gender + age + fare,
                   data = titanic_imputed, family = "binomial")

explain_glm <- explain(titanic_glm,
                       data = titanic_imputed,
                       y = titanic_imputed$survived,
                       verbose = FALSE)

pdp_numerical <- partial_dependence(explain_glm, N = 50, variable_type = "numerical")
pdp_categorical <- partial_dependence(explain_glm, N = 50, variable_type = "categorical")

# Bind plots by rows
bind_plots(plot(pdp_numerical), plot(pdp_categorical), byrow = TRUE)

# Bind plots by columns
bind_plots(plot(pdp_numerical), plot(pdp_categorical), byrow = FALSE)

ingredients

Effects and Importances of Model Ingredients

v2.2.0
GPL-3
Authors
Przemyslaw Biecek [aut, cre] (<https://orcid.org/0000-0001-8423-1823>), Hubert Baniecki [aut] (<https://orcid.org/0000-0001-6661-5364>), Adam Izdebski [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.