ggplot2 icon indicating copy to clipboard operation
ggplot2 copied to clipboard

No ticks no space

Open teunbrand opened this issue 1 year ago • 0 comments

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 avatar Sep 03 '24 07:09 teunbrand