wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Matplotlib Quiz Class 12th

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

What is the primary purpose of the Matplotlib library?

a)

Data analysis

b)

Creating static, animated, and interactive 2D plots

c)

Web development

d)

Creating 3D plots

2.

Which command is used to install Matplotlib?

a)

pip install matplotlib

b)

install matplotlib

c)

pip get matplotlib

d)

matplotlib install

3.

What is the alias used for the Pyplot module in Matplotlib?

a)

mpl

b)

py

c)

plt

d)

pyp

4.

What function is used to create a figure in Matplotlib?

a)

draw()

b)

figure()

c)

create()

d)

plot()

5.

What should be included to make charts easily understood?

a)

No additional information

b)

Only a legend

c)

Only axis labels

d)

Chart title and axis labels

6.

Which function is used to display the figure created?

a)

display()

b)

view()

c)

show()

d)

render()

7.

What is a marker in a line chart?

a)

A title for the chart

b)

A color for the line

c)

A symbol representing a data value

d)

A type of chart

8.

What does the linewidth property control?

a)

The style of the line

b)

The width of the line

c)

The color of the line

d)

The height of the line

9.

Which parameter can be used to change the style of a line chart?

a)

format

b)

style

c)

linestyle

d)

design

10.

What type of plot is used to visualize growth or decline over time?

a)

Histogram

b)

Scatter plot

c)

Line plot

d)

Bar chart

11.

What is the purpose of the df.plot(kind='hist') function?

a)

To create a histogram

b)

To create a line plot

c)

To create a scatter plot

d)

To create a bar chart

12.

What does the fill property do in a histogram?

a)

Changes the height of the columns

b)

Controls the color of the histogram

c)

Determines if the histogram is filled with color

d)

Sets the border color

13.

Which of the following is NOT a valid linestyle?

a)

curved

b)

dashed

c)

dotted

d)

solid

14.

What does the edgecolor property control in a bar chart?

a)

The color of the title

b)

The background color

c)

The border color of the bars

d)

The color of the bars

15.

What is the default line width in Matplotlib?

a)

1 pixel

b)

3 pixels

c)

0.5 pixels

d)

2 pixels

16.

Which of the following is NOT a type of plot that Matplotlib can create?

a)

Scatter plot

b)

Bar chart

c)

3D pie chart

d)

Line plot

17.

Which module in Matplotlib is commonly used for plotting?

a)

numpy

b)

scipy

c)

pyplot

d)

pandas

18.

What is the purpose of the plt.grid() function in Matplotlib?

a)

To add grid lines to the plot

b)

To display the plot

c)

To change the color of the plot

d)

To save the plot

19.

Which of the following is a method to save a figure in Matplotlib?

a)

plt.export()

b)

plt.savefig()

c)

plt.save()

d)

plt.store()

20.

What does the 'xlabel' method do in a Matplotlib plot?

a)

Sets the title of the plot

b)

Labels the y-axis

c)

Defines the limits of the x-axis

d)

Labels the x-axis