Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

We will come back to the Iris dataset many times. For now we look at a plotting technique called “jittering”, which makes it possible to show data in a scatter plot even when many points take the same value. It is an alternative to histogram techniques and to adjusting the transparency (the alpha value).

[[5.1 3.5 1.4 0.2]
 [4.9 3.  1.4 0.2]
 [4.7 3.2 1.3 0.2]
 [4.6 3.1 1.5 0.2]
 [5.  3.6 1.4 0.2]]
[0 0 0 0 0]
Two plots, one above the other, of the Iris data. Above, a scatter plot of petal length (1 to 7 cm) against petal width (0 to 2.5 cm), the three species told apart by colour and the values slightly jittered so that equal measurements do not cover each other up. One species, in yellow, forms a compact group at the bottom left, under 2 cm long and under 0.7 cm wide, with empty space between it and everything else. The other two run diagonally up to the right and merge into one another: an olive-grey species around 3 to 5 cm long, and a dark blue one from about 4.8 cm, the widest petals reaching 2.5 cm. Below, a histogram of petal length alone in the same colours: the yellow species a narrow peak at 1.5 cm reaching fifteen plants per bin, the other two broad and overlapping between 3 and 7 cm, with no gap to separate them.