Altair is the only plotting library that I’ve felt like loved me back. Maybe ggplot2 would love me back as well, but it’s locked away in the tower

altair-upset: The Evolution of UpSet plots in Altair

submited by
Style Pass
2025-01-20 17:00:43

Altair is the only plotting library that I’ve felt like loved me back. Maybe ggplot2 would love me back as well, but it’s locked away in the tower of R.

I went on a bit of a lark when I stumbled upon the original upset-altair-notebook from HMS-DBMI. It was just a Jupyter Notebook, and only worked with Altair 4, which met none of my requirements.

The original notebook was great, but I needed something I could quickly pip install and use across projects. Plus, I needed to use Altair 5 for marimo, I wanted to future-proof this tool for the community.

First step was packaging. I’m a big fan of not reinventing the wheel, so I kept the core visualization logic but wrapped it in a proper Python package structure. This meant:

Here’s where it gets interesting - I created a snapshot of the Altair 4 functionality before diving into the Altair 5 boss battle. Think of it like saving your game before a major fight - if something goes wrong, you can always roll back to a working state.

Why? Because I’ve learned from enough bioinformatics murder mysteries that breaking changes in dependencies can be a nightmare. I tried to just port the function to Altair 5 and wound up with some really weird functionality that I couldn’t make sense of.

Leave a Comment