-
Notifications
You must be signed in to change notification settings - Fork 18
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
add global option to specify default dpi #21
Conversation
Version 0.2.0
Thanks @jan-glx We'll review this. If nothing else, you've pointed out there some typos in the roxygen2 docs (which is a leftover from the major rewrite we did a few months ago). I only noticed this now. We should also do a first major release for CRAN, e.g. version 1.0.0 CC @VPetukhov |
Hi @jan-glx Thanks for the PR and issue. Could you write a few sentences regarding the rationale behind this change? I'm guessing you would like to globally set this parameter for all plots, correct? |
That's right! I use rasterize a lot and don't want to add the On a side note: I think you should soft-deprecate the old |
I see where you're coming from. We've considered this, but they're too widely used. So we've simply created interfaces using these old function names to the new setup. Some users have been confused that certain parameters are no longer used, but they appear to be the minority. We've only heard back from one person, tbh. Throwing a warning at this stage after several months feels a bit confusing/pedantic. I worry it will cause more confusion than necessary. |
Hi @jan-glx , thanks for the PR! @evanbiederstedt , configuring defaults seems totally reasonable to me. My only question here is whether we expect to have more in the future. Because if we do, I think that the data.table approach is really inconvenient: you never remember all the names of the options and need to go to the source code for that. Both ggplot2 and knitr store these options in special environments with setters and getters. I think that having a setter with a documented list of options as parameters would be of huge help for users if there is more than one option. But if we think that it's only dpi we want to configure, I think the current solution is fine. Maybe, we only need to set the default in the |
I did consider setting |
Indeed, that makes a lot of sense, thanks! |
Hi @VPetukhov
I would be in favor of this approach. EDIT: That is, only doing this for dpi |
This does work:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I'll add a comment in the vignettes clarifying things
@VPetukhov I updated the vignettes and CHANGELOG in this PR as well. Please have a look. We can update the version after this to 0.2.2 on the main branch, and update on CRAN. Thanks, Evan |
I think this is reasonable. We can have a larger discussion on the PR from dev -> main |
fixes #20