Display vega spec in Jupyter Lab
问题 How can I display a vega spec (such as this force directed layout) in Jupyter Lab/JupyterLab? 回答1: You can use Vega Embed through the javascript extension: Add the scripts: %%javascript var script = document.createElement('script'); script.type = 'text/javascript'; script.src = '//cdn.jsdelivr.net/npm/vega@5'; document.head.appendChild(script); var script = document.createElement('script'); script.type = 'text/javascript'; script.src = '//cdn.jsdelivr.net/npm/vega-embed@6'; document.head