Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:DistrictDataLabs Yellowbrick Anscombe Plot

From Leeroopedia


Knowledge Sources
Domains Visualization, Data_Science
Last Updated 2026-02-08 05:00 GMT

Overview

Concrete tool for rendering Anscombe's Quartet demonstration plot illustrating the importance of data visualization, provided by the Yellowbrick library.

Description

The anscombe module embeds four datasets from Anscombe's Quartet (1973). These datasets have nearly identical simple statistical properties (mean, variance, correlation, linear regression line) but produce dramatically different scatter plots. The function renders a 2x2 grid with scatter plots and linear best fit lines.

Usage

Import this function for teaching or demonstration contexts where you want to illustrate why summary statistics alone are insufficient and visualization is essential for understanding data.

Code Reference

Source Location

Signature

def anscombe():
    """
    Creates 2x2 grid plot of 4 Anscombe's Quartet datasets.

    Returns
    -------
    axa, axb, axc, axd : tuple of matplotlib.Axes
    """

Import

from yellowbrick.anscombe import anscombe

I/O Contract

Inputs

Name Type Required Description
(none) Function takes no arguments

Outputs

Name Type Description
axes tuple of 4 Axes The four matplotlib Axes objects (axa, axb, axc, axd)

Usage Examples

from yellowbrick.anscombe import anscombe
import matplotlib.pyplot as plt

axes = anscombe()
plt.tight_layout()
plt.show()

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment