Q1:
2025: 27 May Shift 2
Informatics Practices
Matplotlib Plotting
Easy
Informatics Practices
What does 'plt' signify in the following statement?
import matplotlib.pyplot as plt
2025: 27 May Shift 2
Informatics Practices
Matplotlib Plotting
Easy
Informatics Practices
What does 'plt' signify in the following statement?
import matplotlib.pyplot as plt
2025: 27 May Shift 2
Informatics Practices
Matplotlib Plotting
Medium
Informatics Practices
What does a box plot represents in terms of data distribution?
(A) Mean
(B) Outliers
(C) Skewness
(D) Quartiles
2025: 27 May Shift 2
Informatics Practices
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.?
2025: 27 May Shift 2
Informatics Practices
Matplotlib Plotting
Easy
Informatics Practices
Match List-I with List-II
| List-I | List-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') |
2025: 27 May Shift 2
Informatics Practices
Matplotlib Plotting
Medium
Informatics Practices
When should you use a log scale for the y-axis in a line plot?
2025: 22 May Shift 1
Informatics Practices
Matplotlib Plotting
Easy
Informatics Practices
In a boxplot, what do the upper and lower whiskers represent?
2025: 22 May Shift 1
Informatics Practices
Matplotlib Plotting
Medium
Informatics Practices
In a histogram, what does it mean if the distribution is positively skewed?
2025: 22 May Shift 1
Informatics Practices
Matplotlib Plotting
Easy
Informatics Practices
What is the primary purpose of boxplot in data visualization?
2025: 22 May Shift 1
Informatics Practices
Matplotlib Plotting
Easy
Informatics Practices
What does plt.legend( ) function do?
2025: 22 May Shift 1
Informatics Practices
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
2025: 22 May Shift 1
Informatics Practices
Matplotlib Plotting
Easy
Informatics Practices
Match List-I with List-II
| List-I | List-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 |
2025: 21 May Shift 1
Informatics Practices
Matplotlib Plotting
Easy
Informatics Practices
_________ plot uses dots to represent the values for two different variables.
2025: 21 May Shift 1
Informatics Practices
Matplotlib Plotting
Medium
Informatics Practices
______ and _____ governs the values displayed on the x and y-axis.
2025: 21 May Shift 1
Informatics Practices
Matplotlib Plotting
Easy
Informatics Practices
What does the bins parameter in plt.hist() control?
2025: 21 May Shift 1
Informatics Practices
Matplotlib Plotting
Easy
Informatics Practices
What is the main difference between a histogram and barplot?
2025: 21 May Shift 1
Informatics Practices
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')
2025: 20 May Shift 1
Informatics Practices
Matplotlib Plotting
Easy
Informatics Practices
Match List-I with List-II
| List-I | List-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 |
2025: 20 May Shift 1
Informatics Practices
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
2025: 20 May Shift 1
Informatics Practices
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])
2025: 20 May Shift 1
Informatics Practices
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')
2025: 20 May Shift 1
Informatics Practices
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.
2025: 20 May Shift 1
Informatics Practices
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')
2025: 16 May Shift 1
Informatics Practices
Matplotlib Plotting
Easy
Informatics Practices
Which of the following function will be used to label the x axis of a plot?
2025: 16 May Shift 1
Informatics Practices
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()
2025: 16 May Shift 1
Informatics Practices
Matplotlib Plotting
Easy
Informatics Practices
Match List-I with List-II
| List-I | List-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 |
2025: 16 May Shift 1
Informatics Practices
Matplotlib Plotting
Easy
Informatics Practices
OGD stands for___________.
2025: 16 May Shift 1
Informatics Practices
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.
2025: 16 May Shift 1
Informatics Practices
Matplotlib Plotting
Easy
Informatics Practices
Match List-I with List-II
| List-I | List-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 |
2025: 15 May Shift 2
Informatics Practices
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 ____________.
2025: 15 May Shift 2
Informatics Practices
Matplotlib Plotting
Easy
Informatics Practices
Mr. Asit wants to plot line graph. Help him to select the correct matplotlib function from the following.