From 6eaeed7ab830daa52b438fe0e9ecfce55dc6e06b Mon Sep 17 00:00:00 2001 From: kellijohnson-NOAA Date: Mon, 5 Dec 2022 06:56:43 -0800 Subject: [PATCH] Turn off device using on.exit() --- R/plot_catchvmonthbyyear.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/plot_catchvmonthbyyear.R b/R/plot_catchvmonthbyyear.R index e697a62..b83d79f 100644 --- a/R/plot_catchvmonthbyyear.R +++ b/R/plot_catchvmonthbyyear.R @@ -85,6 +85,7 @@ plot_catchvmonthbyyear <- function(data, units = "in", pointsize = 10, res = 300, file = file ) + on.exit(dev.off(), add = TRUE) cex.title <- c(3, 1.3)[1] par(mfrow = c(2, 2), mar = c(0.5, 3.1, 0.5, 0.1), @@ -157,5 +158,4 @@ plot_catchvmonthbyyear <- function(data, text = title, line = -0.1, cex = cex.title ) - dev.off() }