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 ...