I'm using spyder and pycharm for python coding. When I plot something with matplotlib in spyder it shows the result inline in IPython. With Pycharm IPython plots in a new extra window. I'm working on Windows7 and with Anaconda Python2.7.
Is it possible to plot in Pycharm inside in the IPython shell?
Not inside the shell; however, you can use an iPython notebook within PyCharm (2016+) for that purpose. PyCharm supports iPython plots when defined within a .ipynb
(iPython/Jupyter file format) script.
Here is an example:
Open, or create (as shown) a .ipynb
script:
An here is what you get if you code inside a freshly made .ipynb
file within PyCharm 2016 or later. Notice the %matplotlib inline
, which comes after matplotlib.pyplot
import.
In this version of PyCharm several great features to integrate Jupyter Notebooks and PyCharm were added.
First, create a new Jupyter Notebook or open up an existing one.
Second, you can Insert a new cell or you can work on existing cells.
Third, you can Run or Debug a Cell:
Fourth, if you run the cell, the result will be reflected in the right side of the screen.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With