ggplot axis tick labels code example

Example 1: size of ticks labels in r ggplot

# Changer l'apparence et l'angle d'orientation des étiquettes
p + theme(axis.text.x = element_text(face="bold", color="#993333", 
                           size=14, angle=45),
          axis.text.y = element_text(face="bold", color="#993333", 
                           size=14, angle=45))

Example 2: change label x axis ggplot2

theme(
  axis.title = element_text(),         # Change both x and y axis titles
  
  axis.title.x = element_text(),       # Change x axis title only
  axis.title.x.top = element_text(),   # For x axis label on top axis
  
  axis.title.y = element_text(),       # Change y axis title only
  axis.title.y.right = element_text(), # For y axis label on right axis
)

Tags:

Misc Example