How do Seaborn figure-level and axes-level plotting functions differ?

Quick Overview

Asks how Seaborn's figure-level and axes-level plotting functions differ in what they draw on, which arguments they accept and what object they return. Tests practical plotting skills such as building subplot layouts, faceting by category and customizing the resulting figure.

How do Seaborn figure-level and axes-level plotting functions differ?

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: easy

Interview Round: Other

Describe the fundamental difference between Seaborn's "figure-level" and "axes-level" plotting functions. What are the practical implications, especially regarding argument passing like the `ax` argument and the type of object returned? ```hint Try to combine them Think about what you would have to do to show a `histplot` and a `displot` side by side in one `plt.subplots()` layout. ``` ### What a Strong Answer Covers - What each kind of function draws on, and which one creates the Matplotlib figure - How the `ax=` argument behaves for each kind - What each kind returns and how you customize the plot afterward - How sizing and faceting work for each kind - When to choose one over the other in practice ### Follow-up Questions - How would you put a histogram into the second panel of a 1x2 `plt.subplots()` layout? - After calling `catplot` with `col=`, how do you give each facet its own title and save the figure to a file? - Why does calling `plt.figure(figsize=(10, 4))` before `relplot` not change the size of the plot? - When would you build a `FacetGrid` yourself and map an axes-level function onto it?

Overview: Asks how Seaborn's figure-level and axes-level plotting functions differ in what they draw on, which arguments they accept and what object they return. Tests practical plotting skills such as building subplot layouts, faceting by category and customizing the resulting figure.

PracHub logo
General
Nov 25, 2026
easyData ScientistOtherData Manipulation (SQL/Python)
0
0

Describe the fundamental difference between Seaborn's "figure-level" and "axes-level" plotting functions. What are the practical implications, especially regarding argument passing like the ax argument and the type of object returned?

What a Strong Answer Covers Guidance

  • What each kind of function draws on, and which one creates the Matplotlib figure
  • How the ax= argument behaves for each kind
  • What each kind returns and how you customize the plot afterward
  • How sizing and faceting work for each kind
  • When to choose one over the other in practice

Follow-up Questions Guidance

  • How would you put a histogram into the second panel of a 1x2 plt.subplots() layout?
  • After calling catplot with col= , how do you give each facet its own title and save the figure to a file?
  • Why does calling plt.figure(figsize=(10, 4)) before relplot not change the size of the plot?
  • When would you build a FacetGrid yourself and map an axes-level function onto it?