We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We tried the following code snippet. It works with try.jupyter.org:
%matplotlib inline import time import pylab as pl from IPython import display for i in range(10): pl.plot(pl.randn(100)) display.clear_output(wait=True) display.display(pl.gcf()) pl.gcf().clear() time.sleep(1.0)
where pl.gcf().clear() clears existing plots.
pl.gcf().clear()
Documents for users' review: https://ipython.org/ipython-doc/3/api/generated/IPython.display.html
The text was updated successfully, but these errors were encountered:
I tried to write a code snippet on @wangkuiyi 's basis. The effect is as follow:
import numpy as np import time import pylab as pl from IPython import display def plot(x, y): pl.ylim(0, 10) pl.xlim(0, 10) pl.plot(x, y) pl.xlabel('X') pl.ylabel('Error') display.clear_output(wait=True) display.display(pl.gcf()) pl.gcf().clear() time.sleep(1.0) def train(callback): x = [] y = [] for i in range(11): x.append(i) y.append(np.random.rand()*10) callback(x, y) train(plot)
Sorry, something went wrong.
No branches or pull requests
We tried the following code snippet. It works with try.jupyter.org:
where
pl.gcf().clear()
clears existing plots.Documents for users' review: https://ipython.org/ipython-doc/3/api/generated/IPython.display.html
The text was updated successfully, but these errors were encountered: