Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use withr::local_par to set graphical parameters #25

Open
weiyaw opened this issue Jul 30, 2021 · 2 comments
Open

Use withr::local_par to set graphical parameters #25

weiyaw opened this issue Jul 30, 2021 · 2 comments

Comments

@weiyaw
Copy link
Contributor

weiyaw commented Jul 30, 2021

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.

@filipematias23
Copy link
Collaborator

Weiyaw,

That's a great suggestion.

Our team will work on this.

Thank you,
Filipe

@dlebauer
Copy link
Contributor

dlebauer commented Dec 5, 2021

Now that #26 has been merged can this be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants