title: How to remove x and y axis labels from a boxplot in R?
body: <p>I have been writing some code for a class, and I have got stuck in how to remove the x and y labels from the boxplot. I am planning to place it within a 1st graph, so they are redundant. </p>
  
  <p>If anyone also knows how to add a line at 0 to my line graph, that would be amazing aswell!</p>
  
  <p>Code:</p>
  
  <pre><code>#load data up 
  library(readxl)
  TempData &lt;- read_excel("R Data/TempData.xlsx")
  View(TempData)
  
  #initiliase relevant packages #ggplot2 for creating data visulation and viridis to allow for colour gradients
  library(ggplot2)
  library(viridis)
  
  #plot line graph
  g1 &lt;- ggplot(TempData, aes(x = Year, y = GAT, color = GAT)) +
    geom_line(size = 1.5)  +
    geom_smooth(method=loess, se=TRUE, col = "black") +
    scale_colour_gradient2(low = "green", mid = "yellow" , high = "red", midpoint=median(TempData$GAT)) +
    labs(title = "Global Average Temperature", subtitle = "From 1850 to 2018") +
    xlab("Year") +  ylab ("Average Temperature") +
    theme(plot.title = element_text(face = "bold", hjust = 0.5, size = 16)) +
    theme(plot.subtitle = element_text(face = "italic", hjust = 0.5, size = 10, colour = "Orange")) +
    theme_light()
  
  plot(g1)
  
  #plot boxplot
  g2 &lt;- ggplot(TempData, aes(x="Year", y=TempData$GAT)) + geom_boxplot(outlier.colour = "red", outlier.fill = "red",outlier.shape = 21, outlier.size = 1)
  labs(x=" ", y=" ") +
    stat_summary(fun.y = mean, geom = "point", size = 2.5, colour = "orange") +
    theme_light()
  
  plot(g2)
  
  #arrange two graphs to boxplot sits in top corner of line graph
  g1 + annotation_custom(ggplotGrob(g2), xmin = 1840, xmax = 1930, ymin = 0.20, ymax = 0.88)  
  </code></pre>