Data Visualization MCQ
Data Visualization MCQ
1. Which of the following packages is most commonly used for data visualization in R?
A) dplyr
B) ggplot2
C) caret
D) shiny
Answer: B) ggplot2
A) geom_point()
B) geom_line()
C) geom_bar()
D) geom_histogram()
Answer: A) geom_point()
3. Which of the following arguments is used to change the title of a plot in ggplot2?
A) ggtitle()
B) main_title()
C) title()
D) plot_title()
Answer: A) ggtitle()
B) Creates a histogram
C) Creates a line plot
A) barplot()
B) plot()
C) hist()
D) pie()
Answer: A) barplot()
A) xlabel()
B) xlab()
C) axis_title()
D) label_x()
Answer: B) xlab()
A) theme_minimal()
B) theme_gray()
C) theme_classic()
D) theme_void()
Answer: B) theme_gray()
B) geom_bar()
C) geom_line()
D) geom_point()
Answer: A) geom_boxplot()
9. How can you modify the color of the points in a scatter plot in ggplot2?
A) color()
B) col()
C) fill()
D) aes(color=)
Answer: D) aes(color=)
10. Which of the following can be used to create a pie chart in base R?
A) pie()
B) plot()
C) hist()
D) barplot()
Answer: A) pie()
A) heatmap()
B) map()
C) geom_tile()
D) scale_fill()
Answer: A) heatmap()
A) theme_legend()
B) add_legend()
C) legend()
A) save_image()
B) ggsave()
C) save_plot()
D) export_plot()
Answer: B) ggsave()