Skip to content

theme: Add different ticks length for different axes #2935

Closed
@pank

Description

@pank

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:

PS As for styling, you can use the styler package to implement the in-house style as described in the tidyverse style guide.

Thanks, I will check that. I think it might also be possible to configure ESS to do tidyverse style these days...

@clauswilke

I've wanted this option in the past, so I'd generally be in favor. Not sure if it can be done without the clutter of adding all these new theme elements.

That's a good idea. We could use a "list" like for margins. Would it make sense to allow axis.ticks.length to be either a unit or a "list" with top, 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).

For the theme calculation code, you could probably just write: ...

Thanks! I could see if I within or with works here. That would make is less cluttered as well...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions