Skip to content

Commit

Permalink
Turn off device using on.exit()
Browse files Browse the repository at this point in the history
  • Loading branch information
kellijohnson-NOAA committed Dec 5, 2022
1 parent 484b6eb commit 6eaeed7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/plot_catchvmonthbyyear.R
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -157,5 +158,4 @@ plot_catchvmonthbyyear <- function(data,
text = title,
line = -0.1, cex = cex.title
)
dev.off()
}

0 comments on commit 6eaeed7

Please sign in to comment.