twoHelixestwoHelixes Start free

Datasets / Iris

Petal length against petal width, by species

The classic result: two of the three species separate cleanly on petals alone, and the pair that overlaps is the pair that always overlaps.

Question how do petal length and width separate the species?
Petal length against width, by species00.512226.05.64.55.36.74.95.44.03.93.64.33.01.51.11.9Petal Length Cmvirginicaversicolorsetosa
Iris — 150 rows charted from 150, drawn as a scatter
How it decided
Finding the data68 ms

Iris: 150 rows, 5 columns. the two petal measurements and the species label.

Shaping the data3 ms

150 rows in, 150 out across 3 columns. The classic result: two of the three species separate cleanly on petals alone, and the pair that overlaps is the pair that always overlaps.

Choosing the chart13 ms

scatter. Two measures, a categorical split, no time: a scatter.

Applying defaults1 ms

Palette, spacing, axis titles and legend placement applied. 0 issues found.

The transformation

This is the code, not a description of it — the chart above was drawn from what it returns, and the notebook download runs the same lines against the same file.

result = df[["petal_length_cm", "petal_width_cm", "species"]]

What it charted

150 rows out of 150, 3 columns. First 8 shown.

petal_length_cmpetal_width_cmspecies
1.40.2setosa
1.40.2setosa
1.30.2setosa
1.50.2setosa
1.40.2setosa
1.70.4setosa
1.40.3setosa
1.50.2setosa