I'm trying to set ticks size, but when I specify axis.ticks parameter, ticks become horizontal on both axes. For example
data <- data.frame(x =c(1:10), y = c(1:10) )
ggplot(data, aes(x, y)) +
geom_point() +
theme(axis.ticks = element_line(size = 5))
http://prnt.sc/dlwv0i
And angle parameter doesn't work.
ggplot2 version 2.2.0.9000
Any help would be appreciated.
You may do:
ggplot(data, aes(x,y)) +
geom_point() +
theme(axis.ticks.length=unit(.25, "cm"))
This is from https://ggplot2.tidyverse.org/reference/theme.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With