Tucan is an Elixir plotting library built on top of VegaLite designed to simplify the creation of interactive and visually stunning plots. With Tucan you can effortlessly generate a wide range of plots, from simple bar charts to complex composite plots, all while enjoying the power and flexibility of a clean composable functional API. Version 0.1.1 was just released
You can find the docs here.
Sample usage:
scatter =
Tucan.scatter(:iris, "petal_width", "petal_length", tooltip: true)
|> Tucan.color_by("species")
|> Tucan.shape_by("species")
lines = Tucan.lineplot(:stocks, "date", "price", color_by: "symbol", x: [type: :temporal])
area =
Tucan.area(:stocks, "date", "price", color_by: "symbol", mode: :normalize, x: [type: :temporal])
density = Tucan.density(:penguins, "Body Mass (g)", color_by: "Species", fill_opacity: 0.2)
strip =
Tucan.stripplot(:tips, "total_bill", group: "day", style: :jitter)
|> Tucan.color_by("sex")
boxplot = Tucan.boxplot(:penguins, "Body Mass (g)", color_by: "Species")
histogram = Tucan.histogram(:cars, "Horsepower", color_by: "Origin", fill_opacity: 0.5)
pie = Tucan.pie(:barley, "yield", "site", aggregate: :sum, tooltip: true)
donut = Tucan.donut(:barley, "yield", "site", aggregate: :sum, tooltip: true)
heatmap =
Tucan.density_heatmap(:penguins, "Beak Length (mm)", "Beak Depth (mm)", fill_opacity: 1.0)
Tucan.vconcat([
Tucan.hconcat([scatter, lines, area]),
Tucan.hconcat([density, Tucan.vconcat([strip, boxplot]), histogram]),
Tucan.hconcat([pie, donut, heatmap])
])
will generate the following:
Credits go to @jonatanklosko for the awesome VegaLite bindings.