Multiple Choices: ggplot2(Modify Plot)

  1. Which function is used to modify text elements such as axis labels and titles in ggplot2?
  1. Which argument in element_text() controls the text color?
  1. What does face = 'bold' do in element_text()?
  1. Which function is used to remove the legend from a ggplot?”
  1. Which theme function applies a minimalistic design with no grid lines?
  1. What does theme(panel.background = element_rect(fill = 'gray')) do?
  1. Which argument in element_text() adjusts text rotation?
  1. What does theme(plot.title = element_text(hjust = 0.5)) do?
  1. Which function is used to change the font size of axis titles?
  1. What is the default position of the legend in ggplot?
  1. Which function is used to add annotations to a ggplot?
  1. Which of the following correctly adds a text annotation at (x = 10, y = 20)?
  1. What does annotate('rect', xmin = 2, xmax = 4, ymin = 3, ymax = 6, fill = 'blue', alpha = 0.3) do?
  1. Which argument in annotate() controls text size?
  1. Which argument in annotate('segment') specifies an arrow?
  1. What does annotate('point', x = 5, y = 10, color = 'red', size = 3) do?
  1. Which function is preferred for adding multiple text labels tied to data?
  1. What does annotate('text', x = 50, y = 100, label = 'Important Point', color = 'red', fontface = 'bold') do?
  1. Which function is used to highlight a region in ggplot?
  1. What does annotate('segment', x = 2, xend = 5, y = 3, yend = 8, arrow = arrow()) do?