Visual Studio Code has option to connect to jupyter notebook. When it's done I can execute my script by clicking shift+enter (or other shortcut) then there is jupyter notebook execution result in python interactive, eg. if I use matplotlib plot I can show this plot inside python interactive. I try to find same solution (integration with jupyter notebook) to Visual Studio 2017, according to my example I want to show my matplotlib plot in Visual Studio 2017 python interactive windo (which is connected to jupyter notebook I suppose). Is it possible? Is it correct approach?
I am not questioning how I can work with IPYNB file inside Visual Studio 2017, my question is rather how I can execute my python script as jupyter notebook execution?
If I have python script like this
import matplotlib.pyplot as plt
import numpy as np
def f(t):
'A damped exponential'
s1 = np.cos(2 * np.pi * t)
e1 = np.exp(-t)
return s1 * e1
t1 = np.arange(0.0, 5.0, .2)
l = plt.plot(t1, f(t1), 'ro')
plt.setp(l, markersize=30)
plt.setp(l, markerfacecolor='C0')
plt.show()
and execute this script in Visual Studio Code with shift + Enter I have my result plot in python interactive window. If I execute same script in Visual Studio 2017 with Debug->Execute File in Python Interactive then the result plot is outside python interactive window. Inside Visual Studio 2017 I use Anaconda 5.2.0 as Python Enviroment. How to resolve this problem?
Visual Studio 2017 Jupyter? The duplicate is the first result. It links to A Lap Around Python in Visual Studio 2017. Have you installed the Python payload in Visual Studio? - Panagiotis Kanavos