You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to use altair in PyCharm so that I can edit source code in the IDE, execute it in the built-in IPython console, and view plots in a separate window. From my understanding, IPython was the precursor to Jupyter notebooks so this should be possible.
Using the getting started example
import altair as alt
alt.renderers.enable('notebook')
cars = alt.load_dataset('cars')
alt.Chart(cars).mark_point().encode(
x='Horsepower',
y='Miles_per_Gallon',
color='Origin',
).interactive()
At first, I got an error from alt.renderers.enable('notebook'), but this was solved by installing vega and notebook per the troublshooting guide here. However, after that fix I still cannot view the plot. My IPython output is simply <vega.vegalite.VegaLite at 0x7f539d7e6c18> regardless of whether the .interactive() extension is used at the end of the command.
Is there a method similar to plt.show() that I'm missing, or is altair incompatible with visualizing in this PyCharm / IPython setup?
Details
IPython version 7.5.0
PyCharm CE 2019.1
Ubuntu 18.04
The text was updated successfully, but these errors were encountered:
addisonklinke
changed the title
Display chart in PyCharm / iPython
Display chart in PyCharm / IPython
May 17, 2019
I'd like to use altair in PyCharm so that I can edit source code in the IDE, execute it in the built-in IPython console, and view plots in a separate window. From my understanding, IPython was the precursor to Jupyter notebooks so this should be possible.
Using the getting started example
At first, I got an error from
alt.renderers.enable('notebook')
, but this was solved by installingvega
andnotebook
per the troublshooting guide here. However, after that fix I still cannot view the plot. My IPython output is simply<vega.vegalite.VegaLite at 0x7f539d7e6c18>
regardless of whether the.interactive()
extension is used at the end of the command.Is there a method similar to
plt.show()
that I'm missing, or is altair incompatible with visualizing in this PyCharm / IPython setup?Details
The text was updated successfully, but these errors were encountered: