View source: R/guide_longticks.R
guide_longticks | R Documentation |
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
guide_longticks(...)
... |
passed to guide_colorbar |
teunbrand
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.