Altair charts do not render in notebook

I've taken advantage of the new feature that allows the installing of libraries from pip to try to use the Mode Notebook for Altair charts. Unfortunately, the charts do not seem to render even if all the needed libraries are there.

 

Specifically, here is what I did:

! pip install -U altair vega vega_datasets jupyterlab -t "/tmp" > /dev/null 2>&1
import altair as alt
alt.__version__
# 3.0.0
from vega_datasets import data
alt.renderers.enable("notebook")
print(alt.renderers.active)
# notebook
iris = data.iris()
alt.Chart(iris).mark_point().encode(
    x='petalLength',
    y='petalWidth',
    color='species'
)
# no rendered output

Can someone from the Mode team please chime in?

Thanks

Roberto

1reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Roberto Medri FYI I tried to do this as well but the Mode team told me visualisation libraries through pip are not supported at the moment.

    Reply Like
Like Follow
  • 2 mths agoLast active
  • 1Replies
  • 36Views
  • 2 Following