O'Reilly logo

Learning Julia by Rahul Lakhanpal, Anshul Joshi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Plotting DataFrames with Gadfly

The capability provided by Gadfly to work with DataFrames out of the box is really useful. We studied the capability of the DataFrame in previous chapters.

It is a powerful data structure used to represent and manipulate data. Using Gadfly, we can generate complex plots easily. DataFrame is passed to the plot function as the first argument.

The columns in the DataFrame are used by the plot function in the aesthetics by name or index. We will use RDatasets to create the DataFrame for the plot function. To install RDatasets, just follow the underlying method similar to how we did it in Gadfly:

julia> Pkg.add("RDatasets")
julis> using RDatasets

The RDatasets provides us with some real-life datasets, from which ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required