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

Make the order of Figure and path arguments consistent between save() and record() #3636

Open
wsshin opened this issue Feb 16, 2024 · 1 comment
Labels
documentation enhancement Feature requests and enhancements

Comments

@wsshin
Copy link

wsshin commented Feb 16, 2024

I'm wondering if there is a reason for the inconsistent order of Figure and path arguments between save() and record(). Both save figures in one way or another, so I think it will be nice to make the order of the arguments consistent between them.

Specifically, when saving fig::Figure, we use save(path, fig). On the other hand, when saving an animation of a figure, we use record(fig, path, ...) do ... end. Is there a reason why record() uses the reversed order of arguments compared to save()?

It seems that most packages, if not all, in JuliaIO use the (path, data) order in save-like functions. Following this practice, I am wondering if we can change the order of argument in record() to record(path, fig, ...) do ... end.

@wsshin wsshin added the enhancement Feature requests and enhancements label Feb 16, 2024
@wsshin wsshin changed the title Make the location of Figure and path arguments consistent between save() and record() Make the order of Figure and path arguments consistent between save() and record() Feb 16, 2024
@jkrumbiegel
Copy link
Member

I've been confused by that as well. Maybe it would be good to add the other one, they wouldn't conflict type wise. Then the old signature could be deprecated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation enhancement Feature requests and enhancements
Projects
None yet
Development

No branches or pull requests

3 participants