Which is the correct code statement to draw a plot without a line?

11. Which is the correct code statement to draw a plot without a line?

  1. plt.plot(xpoints, ypoints)
  2. plt.plot(xpoints, ypoints, 0)
  3. plt.plot(xpoints, ypoints, False)
  4. plt.plot(xpoints, ypoints, 'o')

Answer: D) plt.plot(xpoints, ypoints, 'o')

Explanation:

You can draw a plot without lines by specifying the string notation parameter 'o', which means 'rings'. The correct code statement to draw a plot without a line is:

plt.plot(xpoints, ypoints, 'o')

Comments and Discussions!

Load comments ↻






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