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

ggsave argument order is counter intuitive #3523

Closed
adisarid opened this issue Sep 7, 2019 · 1 comment
Closed

ggsave argument order is counter intuitive #3523

adisarid opened this issue Sep 7, 2019 · 1 comment
Labels
feature a feature request or enhancement

Comments

@adisarid
Copy link

adisarid commented Sep 7, 2019

The ggsave argument order is "counter intuitive" (when compared to other functions which write files, e.g., write_csv. By that I mean the plot and filename arguments).

It's clear to me that this is because ggsave was written long ago, without having %>% in mind, and perhaps putting filename first was equivalently reasonable.

I personally keep confusing the two.

I wonder if we can put some smart validation check in ggsave which if encounters a ggplot in the first argument and a string (i.e., path) in the second argument will figure out that arguments were specified in reversed order. Perhaps issue a warning but perform the export.
This will make it more compatible with other functions, and with the %>%, as well as backwards compatible.

@thomasp85 thomasp85 added the feature a feature request or enhancement label Jan 21, 2020
@teunbrand
Copy link
Collaborator

We decided we will not change the order of arguments around.

@teunbrand teunbrand closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants