CUET Computer/IP: Informatics PracticesMatplotlib Plotting. Free, no login required.

Q1:

2025: 27 May Shift 2

Matplotlib Plotting

Easy

Informatics Practices

What does 'plt' signify in the following statement?

import matplotlib.pyplot as plt

Answer options
Option 1
Correct Answer
Explanation for 2025: 27 May Shift 2 CSE question 1

Q2:

2025: 27 May Shift 2

Matplotlib Plotting

Medium

Informatics Practices

What does a box plot represents in terms of data distribution?

(A) Mean

(B) Outliers

(C) Skewness

(D) Quartiles

Answer options
Option 2
Correct Answer
Explanation for 2025: 27 May Shift 2 CSE question 2

Q3:

2025: 27 May Shift 2

Matplotlib Plotting

Easy

Informatics Practices

Which of the following properties of matplotlib is used to change the type of lines, such as "solid", "dotted", "dashed" etc.?

Answer options
Option 2
Correct Answer
Explanation for 2025: 27 May Shift 2 CSE question 3

Q4:

2025: 27 May Shift 2

Matplotlib Plotting

Easy

Informatics Practices

Match List-I with List-II

List-IList-II
(A) Drawing a line plot(I) plt.bar(x, height, color = 'blue')
(B) Saving a line plot(II) plt.hist(data, bins =20, color='green')
(C) Drawing a bargraph(III) plt.plot(x, y, color = 'red')
(D) Drawing a histogram(IV) plt.savefig('lineplot.jpg')
Answer options
Option 4
Correct Answer
Explanation for 2025: 27 May Shift 2 CSE question 4

Q5:

2025: 27 May Shift 2

Matplotlib Plotting

Medium

Informatics Practices

When should you use a log scale for the y-axis in a line plot?

Answer options
Option 4
Correct Answer
Explanation for 2025: 27 May Shift 2 CSE question 5

Q6:

2025: 22 May Shift 1

Matplotlib Plotting

Easy

Informatics Practices

In a boxplot, what do the upper and lower whiskers represent?

Answer options
Option 3
Correct Answer
Explanation for 2025: 22 May Shift 1 CSE question 6

Q7:

2025: 22 May Shift 1

Matplotlib Plotting

Medium

Informatics Practices

In a histogram, what does it mean if the distribution is positively skewed?

Answer options
Option 1
Correct Answer
Explanation for 2025: 22 May Shift 1 CSE question 7

Q8:

2025: 22 May Shift 1

Matplotlib Plotting

Easy

Informatics Practices

What is the primary purpose of boxplot in data visualization?

Answer options
Option 3
Correct Answer
Explanation for 2025: 22 May Shift 1 CSE question 8

Q9:

2025: 22 May Shift 1

Matplotlib Plotting

Easy

Informatics Practices

What does plt.legend( ) function do?

Answer options
Option 2
Correct Answer
Explanation for 2025: 22 May Shift 1 CSE question 9

Q10:

2025: 22 May Shift 1

Matplotlib Plotting

Medium

Informatics Practices

Which of the following represent the range of the data?

(A). Box plot

(B). Line plot

(C). Pie chart

(D). Histogram

Answer options

Q11:

2025: 22 May Shift 1

Matplotlib Plotting

Easy

Informatics Practices

Match List-I with List-II

List-IList-II
(A). Line Chart(I). Represents data with bars
(B). Bar Chart(II). Represents data trends over time
(C). Scatter Plot(III). Plots relationship between two variables
(D). Pie Chart(IV). Represents parts of a whole
Answer options

Q12:

2025: 21 May Shift 1

Matplotlib Plotting

Easy

Informatics Practices

_________ plot uses dots to represent the values for two different variables.

Answer options

Q13:

2025: 21 May Shift 1

Matplotlib Plotting

Medium

Informatics Practices

______ and _____ governs the values displayed on the x and y-axis.

Answer options

Q14:

2025: 21 May Shift 1

Matplotlib Plotting

Easy

Informatics Practices

What does the bins parameter in plt.hist() control?

Answer options

Q15:

2025: 21 May Shift 1

Matplotlib Plotting

Easy

Informatics Practices

What is the main difference between a histogram and barplot?

Answer options

Q16:

2025: 21 May Shift 1

Matplotlib Plotting

Medium

Informatics Practices

Which of the following histogram functions are correct?

import matplotlib.pyplot as plt

(A). plt.bar( )

(B). plt.hist( )

(C). plt.plot(kind= 'hist')

(D). plt.plot(kind = 'histogram')

Answer options

Q17:

2025: 20 May Shift 1

Matplotlib Plotting

Easy

Informatics Practices

Match List-I with List-II

List-IList-II
(A) plt.ylabel()(I) configures the gridlines
(B) linestyle='dotted'(II) changes width of the bars
(C) plt.grid()(III) sets the label for y-axis
(D) width=0.5(IV) changes line style
Answer options

Q18:

2025: 20 May Shift 1

Matplotlib Plotting

Medium

Informatics Practices

Which of the following is the correct method to import matplotlib library to plot graphs?

(A) import matplotlib.pyplot

(B) import matplotlib

(C) from matplotlib import pyplot

(D) import matplotlib.pyplot as pd

Answer options

Q19:

2025: 20 May Shift 1

Matplotlib Plotting

Easy

Informatics Practices

Arrange the following statements in proper order to plot bar chart.

(A) plt.savefig(stud.pdf')

(B) plt.show()

(C) import matplotlib.pyplot as plt

(D) plot.bar(['ram','sham','mohan','sohan'],[70,50,40,60])

Answer options

Q20:

2025: 20 May Shift 1

Matplotlib Plotting

Easy

Informatics Practices

Arrange the following statements to draw a Histogram. Assume 'pd' and 'plt' are alias names for pandas and matplotlib.pyplot respectively.

(A) plt.show()

(B) df=pd.read_csv('abc.csv')

(C) plt.legend()

(D) df.plot(kind='hist',label='RECORDS')

Answer options

Q21:

2025: 20 May Shift 1

Matplotlib Plotting

Easy

Informatics Practices

In a histogram the data is sorted into __________, which is the number of intervals in which the entire data is divided.

Answer options

Q22:

2025: 20 May Shift 1

Matplotlib Plotting

Medium

Informatics Practices

Which of the following is correct syntax to plot Histogram? (assume 'df' to be an object of a DataFrame).

(A) df.plot(kind='hist',bins=20)

(B) df.plot(kind='hist',bins=[18,19,20,21])

(C) df.plot(kind='hist',bins=range(20,30))

(D) df.plot(kind='hist')

Answer options

Q23:

2025: 16 May Shift 1

Matplotlib Plotting

Easy

Informatics Practices

Which of the following function will be used to label the x axis of a plot?

Answer options

Q24:

2025: 16 May Shift 1

Matplotlib Plotting

Easy

Informatics Practices

Arrange the following in the proper sequence (assume that matplotlib.pyplot is imported as plt):

(A) plt.plot(date, list)

(B) list= [8.5, 0.5, 6.8]

(C) date = ["15/12", "16/12", "17/12"]

(D) plt.show()

Answer options

Q25:

2025: 16 May Shift 1

Matplotlib Plotting

Easy

Informatics Practices

Match List-I with List-II

List-IList-II
(A) plt.scatter()(I) adds title to the plot
(B) plt.title()(II) plots scatter plot
(C) plt.plot()(III) module used for plotting graphs
(D) matplotlib.pyplot(IV) creates line chart
Answer options

Q26:

2025: 16 May Shift 1

Matplotlib Plotting

Easy

Informatics Practices

OGD stands for___________.

Answer options

Q27:

2025: 16 May Shift 1

Matplotlib Plotting

Medium

Informatics Practices

Which of the following statements are incorrect?

(A) A line plot is a graph that is used to show continuous dataset.

(B) We can substitute the ticks at x axis with a list of values of our choice by using plt(ticks,label).

(C) Histograms are column-charts, where each column represents a range of values, and the height of a column corresponds to how many values are in that range.

(D) A scatter chart is a one - dimensional data visualization method that uses dots to represent the values.

Answer options

Q28:

2025: 16 May Shift 1

Matplotlib Plotting

Easy

Informatics Practices

Match List-I with List-II

List-IList-II
(A) plt.figure()(I) Creates a pie chart
(B) plt.pie()(II) Sets figure size
(C) plt.bar()(III) Creates a bar chart
(D) alpha=0.5(IV) Sets transparency
Answer options

Q29:

2025: 15 May Shift 2

Matplotlib Plotting

Easy

Informatics Practices

To make a histogram the data is sorted into 'bins'. If we do not specify the bins, the default value assigned by matplotlib to bins is ____________.

Answer options

Q30:

2025: 15 May Shift 2

Matplotlib Plotting

Easy

Informatics Practices

Mr. Asit wants to plot line graph. Help him to select the correct matplotlib function from the following.

Answer options