Plotting
Plotting is supported via the @df
macro from StatPlots and can be easily integrated in an @apply
call.
using StatPlots
iris = loadtable(Pkg.dir("JuliaDBMeta", "test", "tables", "iris.csv"));
@apply iris begin
@where :SepalLength > 4
@transform {ratio = :PetalLength / :PetalWidth}
@df scatter(:PetalLength, :ratio, group = :Species)
end
Plotting grouped data can also be achieved by:
plt = plot()
@apply iris :Species begin
@where :SepalLength > 4
@transform {ratio = :PetalLength / :PetalWidth}
@df scatter!(:PetalLength, :ratio)
end
display(plt)