Skip to content

Commit

Permalink
add on.exit command to avoid changing the user's par settings
Browse files Browse the repository at this point in the history
  • Loading branch information
alxsrobert committed Mar 21, 2024
1 parent ee5f54f commit 228f5da
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/plot_importation.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#' @importFrom graphics legend
#' @importFrom graphics par
plot_importations <- function(influences_vect, threshold, config){
oldpar <- par(no.readonly = TRUE)
on.exit(par(oldpar))
par(mfrow = c(1,1), mar = c(5, 5, 1, 1), bty = "l")
plot(sort(influences_vect), type = "l", xlab = "Connection", lwd = 2,
ylab = "Likelihood of connection",
Expand Down

0 comments on commit 228f5da

Please sign in to comment.