Skip to contents

This is the default method of saving plot(s). It will use save_plot() to save the ggplot to a 420 (width) * 525 (height) PNG file. If the trained images are generated differently, one can override this method using bandicoot::register_method().

Usage

AUTO_VI$save_plot(p, path = NULL)

Arguments

p

ggplot. A plot or a list of plots.

path

Character. Character. Path(s) to save the image.

Value

The image path.

Examples


my_vi <- auto_vi(fitted_model = lm(speed ~ dist, data = cars))
p <- my_vi$plot_resid()
my_vi$save_plot(p)
#> [1] "/var/folders/wz/gmj3w1c56x926crggz2jwbh80000gn/T//RtmpotDfMu/file15368781466a2.png"