Which is the correct import statement to import pyplot?

9. Which is the correct import statement to import pyplot?

  1. import matplotlib.pyplot as plt
  2. import pyplot from matplotlib
  3. Both A and B
  4. None of the above

Answer: A) import matplotlib.pyplot as plt

Explanation:

The pyplot is the most useful utility /submodule of matplotlib and the correct import statement to import pyplot is:

import matplotlib.pyplot as plt

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.