Data Science with Python Matplotlib and Seaborn Visualization Flashcards
7 cards from real Data Science with Python Certification practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Data Science with Python Matplotlib and Seaborn Visualization flashcards as text
Which Seaborn function creates a matrix of scatter plots for every pair of variables in a DataFrame?
Answer: sns.pairplot()
sns.pairplot() generates a grid of scatter plots for all pairwise combinations of numeric variables.
In Matplotlib, which method saves the current figure to a file?
Answer: plt.savefig()
plt.savefig('filename.png') saves the current figure to disk in the specified format.
What does the 'hue' parameter do in Seaborn plots?
Answer: Maps a third variable to color encoding
The 'hue' parameter encodes an additional categorical or numeric variable through color differentiation.
Which Matplotlib function creates a figure with multiple subplots and returns both the figure and axes objects?
Answer: plt.subplots()
plt.subplots() creates a figure and a grid of subplots, returning (fig, axes) as a tuple.
In Seaborn, what is the purpose of sns.set_style('whitegrid')?
Answer: Sets the background to white with grid lines
sns.set_style('whitegrid') applies a white background with grid lines to all subsequent Seaborn plots.
Which Matplotlib method changes the x-axis tick labels?
Answer: ax.set_xticklabels()
ax.set_xticklabels() sets the text labels for the x-axis tick marks.
What type of plot does sns.violinplot() combine?
Answer: Box plot and kernel density estimate
A violin plot combines a box plot's quartile information with a kernel density estimate of the distribution shape.
How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. We have not yet matched this exam's facts to an official source, so confirm fees, dates and rules with the exam body. Not reviewed by a subject-matter expert. Editorial policy