ggplot - blank title of axis

To set a blank title for an axis in ggplot using the R language, you can follow these steps:

  1. Load the necessary libraries: library(ggplot2)

  2. Create a sample dataset: data <- data.frame(x = 1:10, y = 1:10)

  3. Create a basic ggplot object using the dataset: p <- ggplot(data, aes(x = x, y = y))

  4. Customize the axis titles by modifying the theme: p <- p + theme(axis.title.x = element_blank(), axis.title.y = element_blank())

  5. Display the plot: print(p)

By following these steps, you will be able to create a ggplot with blank titles for both the x and y axes.