Visualizing the Iris flowers data

Visualization is a powerful tool in exploratory data analysis, helping us to identify patterns that would otherwise be hard to spot just by looking at the numbers. Julia provides access to some excellent plotting packages that are very easy to set up and use.

We'll illustrate with some plots created with Gadfly.

We'll start by adding Gadfly with pkg> add "Gadfly"and we'll continue with julia> using Gadfly. This will bring into scope Gadfly's plot()method. Now, let's find some interesting data to visualize.

In the previous section, we have identified that there is a strong covariant relation between SepalLength and PetalLength. Let's plot the data:

julia> plot(iris, x=:SepalLength, y=:PetalLength, color=:Species) ...

Get Julia Programming Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.