-
Notifications
You must be signed in to change notification settings - Fork 333
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from posterIssue requires more information from poster
Description
Environment data
- VS Code version: 1.51.1
- Jupyter Extension version (available under the Extensions sidebar): v2020.11.392013122
- Python Extension version (available under the Extensions sidebar): 3.8.6
- OS (Windows | Mac | Linux distro) and version: Windows 10 20H2
- Python and/or Anaconda version: 3.8.6
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): XXX
- Jupyter server running: Local | Remote | N/A
Expected behaviour
Should show interactive window
Actual behaviour
Error Reporting:
ReferenceError: IPython is not defined
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
- Install Python extension by Microsoft
- Open Jupyter notebook (Inside vscode with help of extension)
- Type "%matplotlib notebook"
- Enter code:
##Start
import numpy as np
import matplitlib.pyplot as plt
import matplotlib.animation as animation
n = 100
x = np.random.randn(n)
def update(curr):
#check if animation is at the last frame, and if so, stop the animation a
if curr == n:
a.event_source.stop()
plt.cla()
bins = np.arange(-4, 4, 0.5)
plt.hist(x[:curr], bins=bins)
plt.axis([-4,4,0,30])
plt.gca().set_title('Sampling the Normal Distribution')
plt.gca().set_ylabel('Frequency')
plt.gca().set_xlabel('Value')
plt.annotate('n = {}'.format(curr), [3,27])
fig = plt.figure()
a = animation.FuncAnimation(fig, update, interval=100)
##END
Logs
Output for Jupyter
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Jupyter
)
XXX
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from posterIssue requires more information from poster