Which function is used to draw a scatter plot?

25. Which function is used to draw a scatter plot?

  1. scatterplot()
  2. pyscatter()
  3. scatters()
  4. scatter()

Answer: D) scatter()

Explanation:

To draw a scatter plot, you can simply use the scatter() function. This function is used to plot one dot for each observation. It accepts two arrays of the same length for the x and y-axis.

plt.scatter(x, y)

Where x and y can be the NumPy arrays.

Comments and Discussions!

Load comments ↻






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