News for hackers. Stuff that matters.
Re:Vega-Altair: Declarative Visualization in Python by TheAlchemist on Sunday February 25, 2024 @06:25PM (#39506027)
Altair is great.

I'm using Plotly more lately, for 2 reasons - chart have very good interactivity by default and I'm also a Dash user - so it comes in naturally.

But I believe Altair is excellent for exploration - simple charts are very simple to create, and it's not complicated to create a complex exploration dashboard - with all charts linked between them - so you can select a subset of data on one chart, and it automatically updates the others. Highly recommend at least exploring it !

Re:Vega-Altair: Declarative Visualization in Python by pid-1 on Monday February 26, 2024 @02:19AM (#39508430)
Also Plotly generates Javascript so it has wrappers for many python frameworks such as Streamlit.

I'm also using it in a regular React app and it has quite decent APIs.

Re:Vega-Altair: Declarative Visualization in Python by jmmease on Monday February 26, 2024 @10:45AM (#39512582)
(a current Altair maintainer and a former plotly.py maintainer here)

Plotly is definitely a great option as well, and it can do a bunch of things Vega-Altair is not designed for. One comment, just in case you weren't aware, is that there is a relatively new library that provides good integration between Altair and Dash: https://github.com/altair-viz/dash-vega-components. It even makes it possible to access Altair selection states in Dash callbacks so that you can have other dashboard components respond to selections.

Re:Vega-Altair: Declarative Visualization in Python by TheAlchemist on Monday February 26, 2024 @05:24PM (#39517460)
Thank you !

Wasn't aware of that. Are there any plans to improve the interactivity - by that I mean scale on X / Y independently - 'plotly' like ? I know you can bind specifically to one axis, when generating the chart, however, what I usually want is to be able to just zoom in on a specific axis when looking at the chart - Plotly is really great as the behaviour is depending of what you select - a rectangle is just a rectangle (zoom on both axes), a vertical selection zooms on Y axis, and horizontal one on X axis.