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/61/bv7_1qzs20x6fjb2rsv7513r0000gn/T//RtmpWXhLYm/file1108639332e8.png"