CBSE Class 12 Informatics Practices
Question 2 of 73
Data Visualization using Matplotlib — Question 2
Back to all questions 2
Question Assertion (A): import matplotlib.pyplot as plt is used to import pyplot module.
Reasoning (R): Matplotlib is a Python library and pyplot is a module that contains functions to create various plots.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Both A and R are true and R is the correct explanation of A.
Explanation
The command to import pyplot is import matplotlib.pyplot as plt. Matplotlib is a Python 2D plotting library for creating publication-quality figures. Pyplot is a module within the Matplotlib library that contains a collection of methods which allow users to create 2D plots and graphs easily and interactively.