• Home
  • Textbooks
  • CUET (UG) Question Bank Chapter-wise and Topic-wise General Test | For 2024 Exam
  • PLOTTING DATA USING MATPLOTLIB

CUET (UG) Question Bank Chapter-wise and Topic-wise General Test | For 2024 Exam

Oswaal Editorial Board

Chapter 4

PLOTTING DATA USING MATPLOTLIB - all with Video Answers

Educators


Section 1

[A] MULTIPLE CHOICE QUESTIONS

Problem 1

The command used to save a plotted graph using pyplot function is $\qquad$
(A) plt.save()
(B) plt.savefig()
(C) plt.savepicture()
(D) plt.saveimage()

Check back soon!

Problem 2

Which command is used to show a chart?
(A) chartshow()
(B) show()
(C) display()
(D) showchart()

Check back soon!

Problem 3

The function used to give title to a graph is $\qquad$
(A) plt.show()
(B) plt.plot()
(C) plt.title()
(D) plt.titleshow()

Check back soon!

Problem 4

The command used to show legends is $\qquad$
(A) display(
(B) show()
(C) legend()
(D) legends()

Check back soon!

Problem 5

Which of the following is not a valid chart type?
(A) lineplot
(B) bargraph
(C) histogram
(D) statistical

Check back soon!

Problem 6

The command used to give a heading to a graph is
$\qquad$
(A) plt.show()
(B) plt.plot()
(C) plt.xlabel()
(D) plt.title()

Check back soon!

Problem 7

Using Python Matplotlib $\qquad$ can be used to count how many values fall into each interval.
(A) lineplot
(B) bargraph
(C) histogram
(D) subplot

Check back soon!
01:03

Problem 8

Which of the following is not a valid plotting function of "pyplot"?
(A) bar()
(B) hist()
(C) histh()
(D) $\operatorname{barh}()$

Jerrah Biggerstaff
Jerrah Biggerstaff
Numerade Educator
00:16

Problem 9

The command used to display the title for $x$-axis to a graph is $\qquad$
(A) plt.xtitle()
(B) plt.xaxis()
(C) plt.xlabel()
(D) plt.saxistitle()

Lily An
Lily An
Numerade Educator

Problem 10

Out of the following, which function cannot be used for customization of charts in Python?
(A) xlabel()
(B) colour()
(C) title()
(D) xticks()

Check back soon!
02:24

Problem 11

What is the minimum number of arguments required for plot() function in matplotlib?
(A) 1
(B) 2
(C) 3
(D) 4

Aman Gupta
Aman Gupta
Numerade Educator
01:06

Problem 12

$\qquad$ is the function to save the graph.
(A) Savefig 0
(B) Savefigure()
(C) Savegraph()
(D) Savechart()

Narayan Hari
Narayan Hari
Numerade Educator

Problem 13

Figure Can't Copy
(A) import matplotlib.pyplot as plt ( plt.plot([1, 2], $[4,5]$ )
(B) import matplotlib.pyplot as plt plt.plot([1,2,3], [4,5,1]) plt. show() plt.show()
(C) import matplotlib.pyplot as plt ( plt.plot([2,3], [5, 1])
(D) import matplotlib.pyplot as plt. plt.plot([1,3], $[4,1])$ plt. show() plt.show()

Check back soon!
01:12

Problem 14

Read the statements given below and identify the right option to draw a histogram.
Statement A: To make a Histogram with Matplotlib, we can use the plt.hist() function.
Statement B: The bin parameter is compulsory to create histogram.
(A) Statement A is correct
(B) Statement B is correct
(C) Statement A is correct, but Statement B is incorrect
(D) Statement A is incorrect, but Statement B is correct

Nick Johnson
Nick Johnson
Numerade Educator

Problem 15

Which graph should be used where each column represents a range of values, and the height of a column corresponds to how many values are in that range?
(A) plot
(B) line
(C) bar
(D) histogram

Check back soon!
00:57

Problem 16

The $\qquad$ is a bounding box with ticks and labels.
(A) chart
(B) figure
(C) axes
(D) application

Anna Jones
Anna Jones
Numerade Educator

Problem 17

$\qquad$ function is used to give $\mathrm{x}$ axis title.
(A) xtitle()
(B) $x$ label()
(C) title()
(D) $x$ _title()

Check back soon!

Problem 18

Plot() is used to create $\qquad$ chart.
(A) line
(B) bar
(C) pie
(D) histogram

Check back soon!
View

Problem 19

$\qquad$ option displays special information about the chart.
(A) QR code()
(B) info()
(C) legend()
(D) hist()

Rashmi Sinha
Rashmi Sinha
Numerade Educator
00:09

Problem 20

Observe the following figure. Identify the coding for obtaining this as output.
Figure Can't Copy
(A) import matplotlib.pyplot as plt.
$$
\begin{aligned}
& \mathrm{x}=[1,3,5] \\
& \mathrm{Y}=[2,8,3] \\
& \text { plt.plot(X,Y) } \\
& \text { plt.ylabel('x - axis') } \\
& \text { plt.xlabel('y axis') } \\
& \text { plt.title('Draw a line.") } \\
& \text { plt.show() }
\end{aligned}
$$
(B) import matplotlib.pyplot as plt
$$
\begin{aligned}
& \mathrm{X}=[1,3,5] \\
& \mathrm{Y}=[2,8,3] \\
& \text { plt.plot(X, Y) } \\
& \text { plt.xlabel('x - axis') } \\
& \text { plt.ylabel('y axis') } \\
& \text { plt.title('Draw a line.") } \\
& \text { plt.show() }
\end{aligned}
$$
(C) import matplotlib.pyplot as plt $\mathrm{x}=[1,3,5]$
$$
\begin{aligned}
& \mathrm{Y}=[3,2,8] \\
& \text { plt.plot( } \mathrm{X}, \mathrm{Y}) \\
& \text { plt.xlabel('‘x-axis') } \\
& \text { plt.ylabel('‘y - axis') } \\
& \text { plt.title('Draw a line.") } \\
& \text { plt.show() }
\end{aligned}
$$
(D) import matplotlib.pyplot as plt.
$$
\begin{aligned}
& \mathrm{X}=[1,5,3] \\
& \mathrm{Y}=[2,8,3] \\
& \text { plt.plot(X, Y) } \\
& \text { plt.xlabel(' } \mathrm{x} \text { - axis') } \\
& \text { plt.ylabel('y - axis') } \\
& \text { plt.title('Draw a line.") } \\
& \text { plt.show() }
\end{aligned}
$$

Matt Gibson
Matt Gibson
Numerade Educator