Python Seaborn Charts Quiz
A 35-question quiz covering Seaborn's high-level plotting interface, including scatter plots, categorical charts, distributions, themes, and statistical visualizations.
Question 1
Which Seaborn function is the primary interface for drawing scatter plots to visualize the relationship between two numeric variables?
Question 2
How do you map a third variable to the color of the points in a scatter plot?
import seaborn as sns
sns.scatterplot(data=df, x='total_bill', y='tip', ____='sex')
Question 3
What is the difference between `scatterplot()` and `relplot()`?
Question 4
You want to vary the size of points based on the 'size' column. Which parameter do you use?
sns.scatterplot(data=tips, x='total_bill', y='tip', ____='size')
Question 5
How can you change the marker style based on a categorical variable 'time'?
Question 6
What happens if you pass a categorical variable to the `x` axis of `scatterplot`?
Question 7
Which function creates a bar chart displaying the mean of a numeric variable per category with error bars?
Question 8
What does a `boxplot` visualize?
Question 9
Which plot combines a box plot with a kernel density estimation (KDE) to show the distribution shape?
Question 10
How do you count the number of observations in each category without a 'y' variable?
sns.____(data=df, x='category')
Question 11
What is the advantage of `swarmplot` over `stripplot`?
Question 12
Which Figure-level function gives access to all categorical plot types (box, violin, bar, etc.) via the `kind` parameter?
Question 13
Which function is best for plotting a univariate histogram?
Question 14
What does a KDE (Kernel Density Estimate) plot represent?
Question 15
How do you add a KDE curve to a histogram?
sns.histplot(data=df, x='value', ____=True)
Question 16
Which function visualizes the bivariate distribution of two variables using contour lines or hex bins?
Question 17
What is `ecdfplot` used for?
Question 18
How does `rugplot` visualize distribution?
Question 19
Which function sets the global visual theme (background, grid, fonts) for Seaborn plots?
Question 20
Which of the following is NOT a built-in Seaborn style?
Question 21
How do you retrieve a color palette with 10 distinct colors?
colors = sns.color_palette(____, 10)
Question 22
What type of palette is best for sequential numeric data (e.g., temperature)?
Question 23
How do you temporarily set a style for a single plot using a context manager?
with sns.____("white"):
sns.scatterplot(...)
Question 24
Which function scales plot elements (font size, line width) for different contexts like 'paper', 'notebook', 'talk', or 'poster'?
Question 25
What does `sns.regplot()` draw?
Question 26
Which function creates a matrix of scatter plots for every pair of variables in a dataset?
Question 27
How do you visualize a correlation matrix as a color-coded grid?
corr = df.corr()
sns.____(corr)
Question 28
What does `lmplot()` offer over `regplot()`?
Question 29
What does the `residplot()` function visualize?
Question 30
In a `jointplot`, what is the default 'kind' of plot in the center?
Question 31
How do you separate charts into columns based on a categorical variable 'region' in `relplot`?
sns.relplot(data=df, x='x', y='y', ____='region')
Question 32
Which parameter allows you to specify the order of categories on the x-axis?
Question 33
How do you rotate x-axis labels to prevent overlap?
Question 34
What does the `ci` parameter control in bar plots and line plots?
Question 35
How do you move the legend outside the plot in a `scatterplot`?
