You can use the interact_manual function. See http://ipywidgets.readthedocs.io/en/latest/examples/Using%20Interact.html#Disabling-continuous-updates
Jason On Mon, Feb 19, 2018, 10:09 Randy Heiland <[email protected]> wrote: > I seem to have fixed my initial problem - rf. attached .ipynb. > > Next question - how do I avoid continuous update when a slider is moved? > > thanks, Randy > > > On Monday, February 19, 2018 at 11:13:02 AM UTC-5, Randy Heiland wrote: >> >> Hello, >> >> I was testing the following on https://try.jupyter.org/ and wondering >> why the plot sometimes disappears: >> >> %matplotlib notebook >> import numpy as np >> import matplotlib.pyplot as plt >> >> def f(p): >> plt.figure(2) >> nx = 10 >> ny = 10 >> x = np.linspace(1, nx, nx) >> y = np.linspace(1, ny, ny) >> xv, yv = np.meshgrid(x, y) >> >> rgb = np.zeros((nx*ny,3)) >> rgb[:,0] += 1 >> rgb[:][p-1] = [0,1,0] >> >> area=200 >> plt.scatter(xv, yv, marker='s', s=area, c=rgb) >> >> plt.xticks([]) >> plt.yticks([]) >> # plt.show() >> >> from ipywidgets import interact, interactive >> interactive_plot = interactive(f, p=(0, 100)) >> interactive_plot >> > -- > You received this message because you are subscribed to the Google Groups > "Project Jupyter" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jupyter/886fd352-09b5-4e50-858a-ebf7c8d3f508%40googlegroups.com > <https://groups.google.com/d/msgid/jupyter/886fd352-09b5-4e50-858a-ebf7c8d3f508%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAPDWZHznV1xxv938KOfGnQ4xftkLMFDcrpMyQvp8Mey0BgVrDw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
