Unit 11: Data visualization - Subjective Questions

ECAP776 • Practice Questions with Detailed Answers

20 questions

1

Define data visualization. Explain the purpose and major features of the Matplotlib library in Python.

2

Describe the basic steps required to create and display a plot using matplotlib.pyplot.

3

What is a line plot? Explain how to create one in Matplotlib and state the situations in which it is useful.

4

Explain how colors, markers, line styles, labels, legends, and grids can be used to customize a line plot.

5

How can multiple data series be drawn on the same line plot? Explain with a suitable example and discuss the role of a legend.

6

What are subplots? Explain how plt.subplots() can be used to create multiple plots in one figure.

7

Describe how to organize and improve multiple subplots using shared axes, subplot titles, a figure title, figure size, and automatic layout adjustment.

8

Define a bar chart. Explain how vertical and horizontal bar charts are created and identify appropriate applications.

9

Distinguish between simple, grouped, and stacked bar charts. Describe how grouped and stacked bar charts can be constructed in Matplotlib.

10

What is a histogram? Explain how it differs from a bar chart and how it is created using Matplotlib.

11

Explain the importance of bin selection in a histogram. What happens when too few or too many bins are used?

12

Describe a box and whisker plot. Explain its five-number summary, interquartile range, whiskers, and outliers.

13

Compare histograms and box plots as methods of studying a numerical distribution.

14

What is a scatter plot? Explain how it helps investigate the relationship between two numerical variables.

15

Explain how marker color, size, shape, transparency, and a color bar can add information to a scatter plot.

16

Define a pie chart. Explain how to create and customize one using labels, percentages, colors, start angle, and exploded slices.

17

Discuss the advantages and limitations of pie charts. When should a bar chart be preferred?

18

Distinguish among line plots, bar charts, histograms, box plots, scatter plots, and pie charts based on the type of data and analytical purpose.

19

Design a Matplotlib figure containing four subplots to visualize monthly sales as a line plot, regional sales as a bar chart, customer ages as a histogram, and advertising cost versus revenue as a scatter plot. Explain the main steps.

20

Explain good practices for creating clear and non-misleading Matplotlib visualizations, including labeling, scales, colors, layout, and saving figures.