-
Notifications
You must be signed in to change notification settings - Fork 2.1k
theme: Add different ticks length for different axes #2935
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
Comments
There's also another issue, more a question for @hadley: We have a solid inheritance system for elements, but we don't for units, such as theme$axis.ticks.length.x.bottom <- theme$axis.ticks.length.x.bottom %||% theme$axis.ticks.length.x %||% theme$axis.ticks.length Would it make sense to add a function that can calculate these units based on the theme and the inheritance tree? |
Would it make sense to add a function that can calculate these units
based on the theme and the inheritance tree?
I'm happy to add something like this if you point me in the right direction.
(I must admit that I was a bit surprised that inheritance did not occur "automatically" given the second argument to `el_def`).
|
Closed via #2934. |
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
Hi,
I would like to add support for different ticks length for different axes (basically extending
axis.ticks.length
).My main motivation is to match an Excel theme that I have been given, which features upwards ticks on the x-axis. I don't want inwards ticks on the y-axis though.
It was first requested in issue #1319.
Related pull request 2934.
My answers to comments submitted to the pull requests:
@batpigandme wrote:
Thanks, I will check that. I think it might also be possible to configure ESS to do tidyverse style these days...
@clauswilke
That's a good idea. We could use a "list" like for
margins
. Would it make sense to allowaxis.ticks.length
to be either aunit
or a "list
" withtop
,bottom
,left
,right
? Is there any precedence for allowing two types?The good things about having a new element in
theme
for each is that it makes auto-completion easy (at least in ESS and I'd assume Rstudio as well, but I'm not sure).Thanks! I could see if I
within
orwith
works here. That would make is less cluttered as well...The text was updated successfully, but these errors were encountered: