guide_longticks: discrete gradient bar with separators, not ticks

View source: R/guide_longticks.R

guide_longticksR Documentation

discrete gradient bar with separators, not ticks

Description

long ticks, giving a neater look to a discrete color bar largely copied and only mildly modified from https://stackoverflow.com/a/62558606/7941188 teunbrand

Usage

guide_longticks(...)

Arguments

...

passed to guide_colorbar

Author(s)

teunbrand

Examples

ggplot(iris, aes(Sepal.Length, y = Sepal.Width, fill = Petal.Length))+
  geom_point(shape = 21) +
  scale_fill_fermenter(breaks = c(1:3,5,7), palette = "Reds") +
  guides(fill = guide_longticks(
    ticks = TRUE,
    even.steps = FALSE,
    frame.colour = "black",
    ticks.colour = "black")) +
  theme(legend.position = "bottom")

tjebo/ggtrail documentation built on Nov. 20, 2023, 11:10 a.m.