altair icon indicating copy to clipboard operation
altair copied to clipboard

Change axis depending on data

Open Make42 opened this issue 4 years ago • 2 comments
trafficstars

I use a transform_filter to filter my data. With that the x-axis is changing quite bit and I would like to

  1. change the axis label (e.g. change "Horsepower" to "Motor" if a different group is selected interactively)
  2. change the axis values

is this possible in altair? If not, could this be implemented or should I ask at vega-lite's issue tracker?

Make42 avatar Apr 05 '21 17:04 Make42

No, it's not possible in Altair. I believe it's possible in newer versions of Vega-Lite via the signals API, but Altair does not yet support this.

jakevdp avatar Apr 05 '21 17:04 jakevdp

I recently opened a related issue in the VL repo https://github.com/vega/vega-lite/issues/7365

joelostblom avatar Apr 17 '21 19:04 joelostblom

A way to do this is described in the developer version of the docs and will be available in the next version of altair. For more explicit support, the vega-lite issue above needs to be implemented, so I'm closing this for now as there is nothing to do on the altair side of things.

joelostblom avatar Feb 06 '23 01:02 joelostblom