FIELDimageR
FIELDimageR copied to clipboard
Use `withr::local_par` to set graphical parameters
Hi,
Would you consider using withr::local_par
to set the graphical parameters?
The current code sets the graphical windows to par(mfrow = c(1, 1))
at the end of functions. However, this line of code won't be executed if the functions exit prematurely. It also forcibly set the user's graphical windows to c(1, 1)
which might not be desirable.
withr::local_par
will only set the parameters in the local scope and revert the parameters back to its original state whenever functions stop running.
Weiyaw,
That's a great suggestion.
Our team will work on this.
Thank you, Filipe
Now that #26 has been merged can this be closed?