pnezis
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.
Trending in Announcing
Hey everyone!
Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries.
offset-based pagination with...
New
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi all!
I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas.
You...
New
Hello
Published a new library - ProcessHub!
ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
This showed up on my feed.. anyone heard of it? Just hype?
Ox Alpha is a reasoning model designed for coding, sustained ag...
New
It’s not that it’s vocabulary is too advanced. It’s something worse.
I get lost trying to follow even a paragraph written by Claude. It’...
New
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
billylanchantin
Hey this is looks great!
I’ve been playing with VegaLite recently. I have a Matplotlib background and I think because of that I found the new API a little confusing. I’ll give this a try!
pnezis
Hey @billylanchantin that was the main reason i implemented it. I have also a seaborn/matplotlib background and the learning curve of VegaLite was steep.
jonatanklosko
@pnezis this is amazing and charts in the docs are absolute fire!!

josevalim
Amazing!
mat-hek
Very cool! Any plans for live/dynamically updated charts? It’s the part of VegaLite that made me struggle the most.
pnezis
@jonatanklosko thanks!
The charts are auto-generated from plain markdown code blocks. A custom markdown processor is used that compiles the block, formats it and renders both the original code block and the vega lite spec.
The underlying package originated from a discussion with @josevalim in the ex_doc repo some time ago.
pnezis
Hi! dynamically updated charts as well as a high level API for interactive charts is in the plans for future releases.
josevalim
@pnezis would you also support heatmaps? My understanding is that they are similar to your current density heatmap, except there is no binning on X and no aggregate on Y.
(X may also need to be nominal).
pnezis
@josevalim correct heatmaps are very similar to denisty heatmaps, but for categorical variables on both axes (ordinal or nominal in vegalite terminology) instead of numerical.
I guess I missed it, will definitely add it.
pnezis
@josevalim
Will release a new version later this week
heatmap/5added