Complete the code to import the matplotlib library for plotting.
import [1] as plt
We use matplotlib.pyplot as the standard library to create scatter plots in Python.
Complete the code to create a scatter plot with x and y data.
plt.[1](x, y)plt.plot which draws lines, not scatter points.The scatter function draws a scatter plot showing points for x and y values.
Fix the error in the code to show the plot correctly.
plt.scatter(x, y)
plt.[1]()plt.plot() or plt.draw() which do not display the plot window.The plt.show() function displays the plot window so you can see the scatter plot.
Fill both blanks to create a scatter plot with labels for axes.
plt.scatter(x, y) plt.xlabel([1]) plt.[2]('Y Axis') plt.show()
plt.title instead of plt.ylabel for y-axis label.Use plt.xlabel('X Axis') and plt.ylabel('Y Axis') to label the axes of the scatter plot.
Fill in the blanks to create a scatter plot with title and grid.
plt.scatter(x, y) plt.title([1]) plt.grid([2]) plt.show()
Set the plot title with plt.title('My Scatter Plot') and enable grid lines with plt.grid(True).
