Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lengthen tick marks in ggplot2

Simple question I am trying to lengthen the tick marks in ggplot2 on the axis - how?

plot <- plot + theme(axis.ticks = element_line(colour = "black", size =2))

If increase the size it only seems to increase the width of them, not the length?

like image 930
Lmm Avatar asked Mar 08 '23 00:03

Lmm


1 Answers

You need axis.ticks.length, i.e.

plot + theme(axis.ticks.length = unit(1, "cm"))
like image 108
markus Avatar answered Mar 15 '23 16:03

markus