Currently the only way to use Altair from an IPython console involves manually calling chart.serve() each time you'd like to display a chart.
With a little work, we could define %altair magic that would work similarly to the %matplotlib magic, and essentially create a persistent web server that will serve charts in the background, and update them each time a new chart is created.
@ellisonbg gave the following leads on how we might approach this:
Looks like the older APIs for doing this have been deprecated in favor
of new prompt_toolkit based APIs:
Currently the only way to use Altair from an IPython console involves manually calling
chart.serve()
each time you'd like to display a chart.With a little work, we could define
%altair
magic that would work similarly to the%matplotlib
magic, and essentially create a persistent web server that will serve charts in the background, and update them each time a new chart is created.@ellisonbg gave the following leads on how we might approach this:
CC/ @matthew-brett