forked from ipython/ipython
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add manual test file as per review by @minrk.
- Loading branch information
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"""Manual test for figure.show() in the inline matplotlib backend. | ||
This script should be loaded for interactive use (via %load) into a qtconsole | ||
or notebook initialized with the pylab inline backend. | ||
Expected behavior: only *one* copy of the figure is shown. | ||
For further details: | ||
https://github.com/ipython/ipython/issues/1612 | ||
https://github.com/matplotlib/matplotlib/issues/835 | ||
""" | ||
|
||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
|
||
plt.ioff() | ||
x = np.random.uniform(-5, 5, size=(100)) | ||
y = np.random.uniform(-5, 5, size=(100)) | ||
f = plt.figure() | ||
plt.scatter(x, y) | ||
plt.plot(y) | ||
f.show() |