CBSE · Class 12 · Informatics Practices

Class 12 Plotting Data using Matplotlib Mock Test (CBSE)

1 practice questions from Plotting Data using Matplotlib, in the style of your board paper, each with a worked answer and the marks for every step. Then take a full chapter test on paper, snap the pages and get every step marked.

Topics in Plotting Data using Matplotlib

  • Introduction to data visualisation
  • Plotting using Matplotlib
  • Customisation of plots: labels, title, legend and markers
  • The pandas plot function
  • Line plot
  • Bar chart
  • Histogram

Plotting Data using Matplotlib practice questions with answers

  1. Q1Short answer2 marks
    Write Python code using the `matplotlib.pyplot` module to draw a line plot for two lists x=[1,2,3,4]x = [1, 2, 3, 4] and y=[10,15,20,25]y = [10, 15, 20, 25]. Set the title of the plot to "Growth"\text{"Growth"} and make the line dashed with red color.
    Show answer and step marks
    1. Import the module: `import matplotlib.pyplot as plt`.+0.5
    2. Define the data: `x = [1, 2, 3, 4]` and `y = [10, 15, 20, 25]`.+0.5
    3. Plot a red dashed line: `plt.plot(x, y, color='red', linestyle='dashed')` (equivalent forms such as `'r--'` or `linestyle='--'` accepted).+0.5
    4. Set the title and display: `plt.title('Growth')` followed by `plt.show()`.+0.5
    Answer: `import matplotlib.pyplot as plt`; `x = [1, 2, 3, 4]`; `y = [10, 15, 20, 25]`; `plt.plot(x, y, color='red', linestyle='dashed')`; `plt.title('Growth')`; `plt.show()`

Take a full Plotting Data using Matplotlib test

PrepitUp writes a fresh paper on this chapter at the length you pick. Write it on paper with a timer, photograph the pages, and see the marks for every step and what to practise next.

  • 15 min10 marks
  • 30 min20 marks
  • 1.5 hr40 marks
  • 3 hr80 marks
See a sample marked answer sheet

Get your Plotting Data using Matplotlib answers marked

Sign in, pick this chapter and a length, write the test on paper and get every step marked.

Sign in to take this test

More Class 12 Informatics Practices mock tests