astropy / astropy/astropy-workshop
Javascript error using %matplotlib notebook
- Dominant language
- Jupyter Notebook
- Stars
- 127
- Forks
- 77
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
In the notebook `00 Using the Jupyter notebook.ipynb` there is a cell with `%matplotlib notebook` followed by another cell with plotting commands. In that second cell, a message is printed `Javascript Error: Can't find variable: IPython`. No plot output appears.
**To Reproduce**
Steps to reproduce the behavior:
Open the notebook `00 Using the Jupyter notebook.ipynb` and execute the first few cells.
**Expected behavior**
Using the `%matplotlib notebook` magic should produced plots that the user can interact with.
**Desktop (please complete the following information):**
Mac OS X Sonoma 14.1.2
Safari Version 17.1.2
**Additional context**
Problem initially reported by Bernhard Schulz at the Astropy workshop at AAS 243.
I found [this issue](https://github.com/jupyter/notebook/issues/7115) implying that the problem was introduced in notebook 7. I tried downgrading to notebook 6.5.6 and the Javascript error still occurred.
Contributor guide
No contributing guide indexed for this repository
Research direction
Open `00 Using the Jupyter notebook.ipynb` and execute the first few cells in Safari to reproduce the JavaScript error and missing plot output. Compare the behavior with the reported notebook 7 and 6.5.6 versions, then verify that `%matplotlib notebook` produces an interactive plot without the `IPython` error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, matplotlib
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100