vega / ipyvega

IPython/Jupyter notebook module for Vega and Vega-Lite
BSD 3-Clause "New" or "Revised" License
372 stars 65 forks source link

Print supresses display of vega-lite figure #62

Open nielsmde opened 7 years ago

nielsmde commented 7 years ago

I've encounterd a problem with pyvega and the Python print function. The following example works, hence the figure is displayed correctly in the notebook:

import altair
altair.Chart(altair.load_dataset('movies')).encode(x='Production_Budget', y='IMDB_Rating')

If I print anything in this same cell, the figure output disappears:

import altair
print('foo')
altair.Chart(altair.load_dataset('movies')).encode(x='Production_Budget', y='IMDB_Rating')

Is this expected behavior? Niels

jakevdp commented 7 years ago

Hi Niels – thanks for the report. I've reported this previously on the altair repo (https://github.com/altair-viz/altair/issues/199) but it's definitely an ipyvega problem rather than an altair problem.

Definitely not expected behavior.