0
0
Matplotlibdata~5 mins

Basic scatter plot with plt.scatter in Matplotlib - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a scatter plot used for in data science?
A scatter plot shows the relationship between two sets of data by displaying points on a graph. Each point represents one data pair, helping us see patterns or trends.
Click to reveal answer
beginner
Which function in matplotlib creates a scatter plot?
The function plt.scatter() is used to create scatter plots in matplotlib.
Click to reveal answer
beginner
What do the two main arguments of plt.scatter(x, y) represent?
The first argument x is the list or array of x-coordinates, and the second argument y is the list or array of y-coordinates for the points.
Click to reveal answer
beginner
How can you add labels to the x-axis and y-axis in a matplotlib scatter plot?
Use plt.xlabel('label') for the x-axis and plt.ylabel('label') for the y-axis to add labels.
Click to reveal answer
beginner
What does the plt.show() function do after creating a scatter plot?
plt.show() displays the plot window so you can see the scatter plot you created.
Click to reveal answer
Which matplotlib function is used to create a scatter plot?
Aplt.plot()
Bplt.scatter()
Cplt.bar()
Dplt.hist()
In plt.scatter(x, y), what does x represent?
Ax-coordinates of points
Bsize of points
Cy-coordinates of points
Dcolor of points
How do you add a label to the y-axis in matplotlib?
Aplt.ylabel('label')
Bplt.xlabel('label')
Cplt.title('label')
Dplt.legend('label')
What does plt.show() do?
ACreates a new plot
BSaves the plot to a file
CClears the plot
DDisplays the plot window
Which of these is NOT a typical use of a scatter plot?
AFinding patterns or clusters
BShowing relationship between two variables
CDisplaying frequency of categories
DVisualizing data points distribution
Explain how to create a basic scatter plot using matplotlib's plt.scatter function.
Think about what data you need and how to show the plot.
You got /4 concepts.
    Describe the purpose of a scatter plot and when you might use it in real life.
    Imagine comparing two things to see if they relate.
    You got /4 concepts.