[go: up one dir, main page]

0% found this document useful (0 votes)
32 views5 pages

MATPLOTLIB

The document outlines an assessment test for a Python for Data Science course, focusing on the Matplotlib library. It includes multiple-choice questions covering various functionalities and features of Matplotlib, such as plotting, labeling, and saving visualizations. The test aims to evaluate students' understanding of data visualization concepts and tools in Python.

Uploaded by

jemimaa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views5 pages

MATPLOTLIB

The document outlines an assessment test for a Python for Data Science course, focusing on the Matplotlib library. It includes multiple-choice questions covering various functionalities and features of Matplotlib, such as plotting, labeling, and saving visualizations. The test aims to evaluate students' understanding of data visualization concepts and tools in Python.

Uploaded by

jemimaa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

DEPARTMENT OF ARTIFICIAL INTELLIGENCE AND DATA

SCIENCE

Name of the Course: Python for Data Science


Course Coordinator: Mrs. M. Gowsalyaa
Academic Year: 2024-2025 (Even)
Name of the Student :
Register Number :

ASSESSMENT TEST-DAY 3
1 MARKS:
1. What is Matplotlib?
a) A programming language
b) A data visualization library
c) A database management system
d) An operating system
2. What is the purpose of Matplotlib’s pyplot module?
a) To create data visualizations
b) To manage data storage
c) To manipulate data frames
d) To install third-party packages
3. Which of the following is not a type of Matplotlib plot?
a) Line plot
b) Scatter plot
c) Pie chart
d) Bar chart
4. How can you add a title to a Matplotlib plot?
a) By using the title() function
b) By using the label() function
c) By using the text() function
d) By using the legend() function
5. What is the purpose of the xlabel() and ylabel() functions in Matplotlib?
a) To add a legend to a plot
b) To add a title to a plot
c) To label the x and y axes of a plot
d) To change the color of a plot
6. How can you save a Matplotlib plot as an image file?
a) By using the save() function
b) By using the export() function
c) By using the savefig() function
d) By using the exportfig() function
7. What is the purpose of the xlim() and ylim() functions in Matplotlib?
a) To set the size of a plot
b) To set the background color of a plot
c) To set the x and y limits of a plot
d) To add annotations to a plot
8. What is the default color for Matplotlib plots?
a) Red
b) Blue
c) Green
d) Black
9. How can you change the color of a Matplotlib plot?
a) By using the color() function
b) By using the hue() function
c) By using the palette() function
d) By specifying the color parameter in the plot() function
10. What is the purpose of the legend() function in Matplotlib?
a) To label the x and y axes of a plot
b) To add a title to a plot
c) To add annotations to a plot
d) To label different lines or markers on a plot
11. What is the purpose of the subplot() function in Matplotlib?
a) To create multiple plots in the same figure
b) To adjust the size of a plot
c) To change the color of a plot
d) To add annotations to a plot
12. What is the purpose of the scatter() function in Matplotlib?
a) To create line plots
b) To create bar charts
c) To create scatter plots
d) To create pie charts
13. What is the purpose of the hist() function in Matplotlib?
a) To create histograms
b) To create line plots
c) To create scatter plots
d) To create bar charts
14. How can you change the size of a Matplotlib plot?
a) By using the figure() function
b) By using the subplot() function
c) By using the size() function
d) By using the xlim() and ylim() functions
15. What is the purpose of the annotate() function in Matplotlib?
a) To add annotations to a plot
b) To change the color of a plot
c) To label different lines or markers on a plot
d) To create legends for a plot
16. What is the purpose of the tight_layout() function in Matplotlib?
a) To adjust the spacing between subplots in a figure
b) To adjust the size of a plot
c) To change the color of a plot
d) To add annotations to a plot
17. What is the purpose of the axis() function in Matplotlib?
a) To add grid lines to a plot
b) To change the x and y limits of a plot
c) To change the color of a plot
d) To label different lines or markers on a plot
18. How can you create a bar chart in Matplotlib?
a) By using the scatter() function
b) By using the hist() function
c) By using the bar() function
d) By using the line() function
19. What is the purpose of the imshow() function in Matplotlib?
a) To display images
b) To create line plots
c) To create scatter plots
d) To create bar charts
20. What is the purpose of the subplots() function in Matplotlib?
a) To create multiple plots in the same figure
b) To adjust the size of a plot
c) To change the color of a plot
d) To add annotations to a plot
21. How can you create a pie chart in Matplotlib?
a) By using the scatter() function
b) By using the hist () function
c) By using the bar() function
d) By using the pie() function
22. What is the purpose of the legend() function in Matplotlib?
a) To add annotations to a plot
b) To change the color of a plot
c) To label different lines or markers on a plot
d) To create legends for a plot
23. How can you change the color of a Matplotlib plot?
a) By using the color() function
b) By using the hue() function
c) By using the cmap() function
d) By using the set_color() function
24. What is the purpose of the xlim() and ylim() functions in Matplotlib?
a) To add grid lines to a plot
b) To change the x and y limits of a plot
c) To change the color of a plot
d) To label different lines or markers on a plot
25. Which module is used for data visualization in Python?
a) NumPy
b) Pandas
c) Matplotlib
d) Scikit-learn

You might also like