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

No ticks no space #6071

Merged
merged 4 commits into from
Dec 2, 2024
Merged

No ticks no space #6071

merged 4 commits into from
Dec 2, 2024

Conversation

teunbrand
Copy link
Collaborator

This PR aims to fix #6069.

Briefly, this PR sets ticks lengths to 0 if the corresponding tick is blank.

Examples from #4722. Current situation:

library(ggplot2)

ggplot(mpg, aes(displ, cty)) +
  geom_point() +
  theme(
    axis.ticks = element_blank(),
    axis.ticks.length = unit(2, "cm")
  )

With this PR:

devtools::load_all("~/packages/ggplot2")
#> ℹ Loading ggplot2

ggplot(mpg, aes(displ, cty)) +
  geom_point() +
  theme(
    axis.ticks = element_blank(),
    axis.ticks.length = unit(2, "cm")
  )

Created on 2024-09-03 with reprex v2.1.1

@teunbrand teunbrand added the visual change 👩‍🎨 Rendering change that will affect look of output label Sep 3, 2024
Copy link
Member

@thomasp85 thomasp85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@teunbrand teunbrand merged commit 3be5d6c into tidyverse:main Dec 2, 2024
13 checks passed
@teunbrand teunbrand deleted the no_ticks_no_space branch December 2, 2024 11:17
@Yunuuuu
Copy link
Contributor

Yunuuuu commented Dec 4, 2024

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
visual change 👩‍🎨 Rendering change that will affect look of output
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatically remove the tick length when tick is blank
3 participants