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

Consider handling/setting margin()'s default values based on the theme being used #6115

Open
arnaudgallou opened this issue Sep 18, 2024 · 0 comments · May be fixed by #6116
Open

Consider handling/setting margin()'s default values based on the theme being used #6115

arnaudgallou opened this issue Sep 18, 2024 · 0 comments · May be fixed by #6116
Labels
feature a feature request or enhancement themes 💃

Comments

@arnaudgallou
Copy link

Currently, the default margin values of margin() are set to 0. This is not ideal because if a user wants to change the margin only on one side of a plot, it forces the user to 1) find out what the default margins of the theme being used are and 2) redefine the default margin values on each other side of a plot.

It would be more convenient if margin() could handle the default values internally (or via a function passed as the default arguments) based on the theme being used so that e.g. one could write:

# ... +
  theme_classic() +
  theme(plot.margin = margin(r = 9.5))

Instead of:

# ... +
  theme_classic() +
  theme(plot.margin = margin(5.5, 9.5, 5.5, 5.5))
@teunbrand teunbrand added feature a feature request or enhancement themes 💃 labels Sep 19, 2024
@teunbrand teunbrand linked a pull request Sep 19, 2024 that will close this issue
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 themes 💃
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants