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
- Q1Short answer2 marksWrite Python code using the `matplotlib.pyplot` module to draw a line plot for two lists and . Set the title of the plot to and make the line dashed with red color.
Show answer and step marks
- Import the module: `import matplotlib.pyplot as plt`.+0.5
- Define the data: `x = [1, 2, 3, 4]` and `y = [10, 15, 20, 25]`.+0.5
- Plot a red dashed line: `plt.plot(x, y, color='red', linestyle='dashed')` (equivalent forms such as `'r--'` or `linestyle='--'` accepted).+0.5
- 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
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