Created: November 2, 2026

The Iris dataset

How do petal and sepal lengths differ across iris species?

  • 150 flowers, with 50 observations per species.
  • Three species: setosa, versicolor, and virginica.
  • All measurements use centimetres.

The next slide compares sepal length with petal length. Each point represents one flower.

Source: the built-in datasets::iris dataset in R. See help("iris") for dataset documentation.

Iris

Hover for measurements. Click a species in the legend to hide or show it. Drag to zoom. Double-click the plot to reset.

What the plot shows

  • Setosa has distinctly shorter petals than the other two species.
  • Versicolor and virginica overlap in some measurements.
  • Across the full dataset, flowers with longer sepals tend to have longer petals.

The species groups help explain the overall pattern. This chart describes an association, not a causal relationship.

Made with R Markdown and Plotly
Created: November 2, 2026