##// END OF EJS Templates
Restore some functionality of the sphinx directive....
Restore some functionality of the sphinx directive. See #11362 The issue is in 2 part, before IPython 7.0 the input splitter was state full, this was (in part) due to readline. The second part is that because of this, we had to be a bit adressive of what was considered complete code (it had to have 2 new line). This is now not required anymore as we can submit stuff as a whole. I hope that this fixes that. I have another fix in mind that count (and reset) the number of consecutive blank line, but that will be more complicated end code.

File last commit:

r16114:15cc5a8e
r24710:73f493f5
Show More
inline_figshow.py
23 lines | 583 B | text/x-python | PythonLexer
"""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 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()