Objective. Students will build and interpret distribution, categorical, and relational Seaborn plots—including KDE, violin, pair plot, and heatmap—and correctly describe the statistical story each chart reveals in written captions.
This lesson, its worked examples and its practice questions has not yet been verified by an industry-certified professional or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.
VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.
Seaborn is a Python data-visualization library built on top of Matplotlib. It provides a high-level interface for drawing attractive and informative statistical graphics with less code than raw Matplotlib requires. Seaborn is tightly integrated with pandas DataFrames, meaning you can pass a DataFrame and column names directly to most plotting functions. For the Google Data Analytics, IBM Data Science Professional, CompTIA Data+, and Microsoft PL-300 credential paths, the ability to produce and interpret statistical charts quickly is a core professional skill.
Seaborn organizes its functions into two tiers.
Axes-level functions draw onto a single Matplotlib `Axes` object. Examples include `histplot()`, `kdeplot()`, `violinplot()`, `scatterplot()`, and `heatmap()`. You can embed these into any Matplotlib figure layout you build yourself.
Figure-level functions create their own `Figure` and can produce multi-panel grids automatically. Examples include `displot()`, `relplot()`, `catplot()`, `lmplot()`, and `pairplot()`. They return a Seaborn grid object, not a plain Axes, so the syntax for adding titles or saving differs slightly. Always check the Seaborn documentation at seaborn.pydata.org to confirm which tier a function belongs to before you combine it with Matplotlib calls—mixing them incorrectly is a common source of errors.
A histogram divides a numeric variable into bins and counts observations per bin, revealing the overall shape of a distribution. A Kernel Density Estimate (KDE) plot smooths that histogram into a continuous curve, making it easier to see whether the distribution is unimodal, bimodal, skewed, or roughly normal. In Seaborn you can produce a KDE alone with `kdeplot()`, or combine a histogram and KDE in one call using `displot(kind='hist')` with `kde=True`.
When describing a KDE, state: (1) the approximate center, (2) the spread or width, and (3) the shape—symmetric, right-skewed (long tail to the right), or left-skewed (long tail to the left).
A violin plot (`violinplot()`) is a hybrid: the outer shape is a mirrored KDE showing the distribution's density at each value, and an inner box plot shows the median and interquartile range. Violin plots are especially useful when you group a numeric variable by a categorical variable—for example, comparing life expectancy across world regions. A wider section of the violin means more data points cluster at that value.
When writing a caption, name the group with the highest or lowest median, note any visible difference in spread, and describe any notable skew visible in the violin shape.
`lmplot()` produces a scatter plot with an ordinary least-squares regression line and a shaded confidence interval overlaid. It is a figure-level function and supports a `hue` parameter to color points by a categorical variable and a `col` parameter to create small multiples. When describing this chart, state the direction of the relationship (positive or negative slope), an impression of its strength (points close to or far from the line), and whether any obvious outliers are visible.
A heatmap (`heatmap()`) encodes numeric values in a matrix as color. The most common use in data analytics is displaying a correlation matrix—a table where each cell holds the Pearson correlation coefficient between two numeric variables. Values range from −1 (perfect negative linear relationship) to +1 (perfect positive linear relationship); 0 means no linear relationship. Pass `annot=True` to print the numeric values inside each cell and `cmap='coolwarm'` for a diverging palette that visually distinguishes positive from negative correlations. Always set `vmin=-1` and `vmax=1` so the color scale is anchored consistently.
`pairplot()` generates a grid of scatter plots for every numeric-variable pair in a DataFrame, with univariate distribution plots (histograms or KDE) along the diagonal. This is a quick exploratory tool—not a finished deliverable—for spotting which pairs of variables show linear trends or clusters. Pass `hue` to color by a categorical column and reveal group separation.
Every chart you submit must include a two-sentence caption that (1) names the chart type and the variables displayed, and (2) states the key statistical finding in plain language. Example for a KDE: "This KDE plot shows the distribution of adult BMI in the health-indicator dataset. The distribution is unimodal and slightly right-skewed, with the bulk of values concentrated between 22 and 30." Vague captions such as "this chart shows BMI" do not earn full credit.
This is a software lab; traditional physical hazards such as electrical lockout/tagout are not present. However, professional data practice requires its own safety habits. Never commit real patient, financial, or personally identifiable data to a public repository. The provided health-indicator CSV contains de-identified public data—treat all health datasets as sensitive by default. Before publishing any analysis, verify that your charts do not inadvertently reveal small-group counts that could re-identify individuals. Save your work frequently and keep a backup copy of the original CSV—do not overwrite source data.
Answer each question, then check it. Nothing is recorded; this is your own practice.
A free tech program — complimentary, as our commitment to get America working. Help us build VoTechWorks. Tell us what works, what doesn’t, and what you want to learn.