<div dir="ltr">Paul,<div><br></div><div>Sorry for the very late response!</div><div><br></div><div>I would suggest passing in a function as a custom argument which takes the frame number and returns your parameter.</div><div><br></div><div>For example (modified from the docs)</div><div><br></div><div>import numpy as np</div><div>import matplotlib.pyplot as plt</div><div>from matplotlib.animation import FuncAnimation</div><div><br></div><div>decades = 5</div><div><br></div><div>fig, ax = plt.subplots()</div><div>xdata, ydata = [], []</div><div>ln, = plt.plot([], [], 'ro', animated=True)</div><div>ax.set_xlim(1, 10**decades)</div><div>ax.set_ylim(1, (10.0**(decades*(decades - 1))))</div><div>ax.set_yscale('log')</div><div>ax.set_xscale('log')</div><div><br></div><div><br></div><div>def init():</div><div>    return ln,</div><div><br></div><div>def update(frame, exp_func):</div><div>    xdata.append(frame)</div><div>    ydata.append(frame ** exp_func(frame))</div><div>    ln.set_data(xdata, ydata)</div><div>    return ln,</div><div><br></div><div>ani = FuncAnimation(fig, update, frames=np.logspace(0, decades),</div><div>                    init_func=init, blit=True,</div><div>                    fargs=(lambda frame: int(np.log10(frame)),))</div><div>plt.show()</div><div><br></div><div><br></div><div><br></div><div><br></div><div>Tom   </div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jan 9, 2018 at 11:50 AM Paul Deitel <<a href="mailto:paul.deitel@deitel.com">paul.deitel@deitel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div><div style="text-align:start;text-indent:0px;word-wrap:break-word;line-break:after-white-space"><div style="text-align:start;text-indent:0px;word-wrap:break-word;line-break:after-white-space"><div style="text-align:start;text-indent:0px;word-wrap:break-word;line-break:after-white-space"><div style="text-align:start;text-indent:0px;word-wrap:break-word;line-break:after-white-space"><div style="text-align:start;text-indent:0px;word-wrap:break-word;line-break:after-white-space"><div style="text-align:start;text-indent:0px;word-wrap:break-word;line-break:after-white-space"><div style="font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;word-wrap:break-word;line-break:after-white-space"><div style="font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span style="text-align:start;text-indent:0px"><span><span><span><span><span><span><span style="text-align:start;text-indent:0px"><span><div style="text-align:start;text-indent:0px;word-wrap:break-word;line-break:after-white-space"><div style="text-align:start;text-indent:0px;word-wrap:break-word;line-break:after-white-space"><div style="text-align:start;text-indent:0px;word-wrap:break-word;line-break:after-white-space"><div style="text-align:start;text-indent:0px;word-wrap:break-word;line-break:after-white-space"><div style="text-align:start;text-indent:0px;word-wrap:break-word;line-break:after-white-space"><div style="text-align:start;text-indent:0px;word-wrap:break-word;line-break:after-white-space"><div style="font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;word-wrap:break-word;line-break:after-white-space"><div style="font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><span class="m_4653950659584000390Apple-style-span" style="border-collapse:separate;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;text-indent:0px;border-spacing:0px"><div style="word-wrap:break-word;line-break:after-white-space"><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px"><span style="text-align:-webkit-auto">Hi Tom,</span></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px"><span style="text-align:-webkit-auto"><br></span></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px"><span style="text-align:-webkit-auto">Thanks for your response. </span></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px"><span style="text-align:-webkit-auto"><br></span></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px">Same figure/artists. </div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div>Basically, for <span style="color:rgb(0,0,0);font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-align:-webkit-auto">the function called by FuncAnimation, </span><span style="text-align:-webkit-auto">I’d like one of my custom arguments to change after some number of frames. I did not find a good way to do that, so I was thinking I could have one animation that does the first set of frames with the initial custom argument value, followed by another animation that does the remaining frames with a different custom argument value. </span></div><div><span style="text-align:-webkit-auto"><br></span></div><div>Thanks,</div></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></div></div></div></div></div></div></div>Paul</span></span></span></span></span></span></span></span></span></div>
</span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></div></div></div></div></div></div></div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><br><div>On Jan 9, 2018, at 8:15 AM, Thomas Caswell <<a href="mailto:tcaswell@gmail.com" target="_blank">tcaswell@gmail.com</a>> wrote:</div><br class="m_4653950659584000390Apple-interchange-newline"><div><div dir="ltr">When you say "another animation" do you mean different data on the same artists in the same figure, different artists in the same figure or a different figure altogether?</div><span>
</span><p dir="ltr">In the first cases I think you could use a generator to sticky tape your data together.  In the second two you will have to roll your own.</p><p dir="ltr">Do you need to be able to change the chain while it is running? If so, what are you using to get your concurrencey? </p><p dir="ltr">Tom</p><span>
</span><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 8, 2018, 12:38 Paul Deitel <<a href="mailto:paul.deitel@deitel.com" target="_blank">paul.deitel@deitel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am trying to chain together a series of animations. Is there a callback mechanism of some sort that could be used to launch a new animation when another animation completes?<br>
<br>
<br>
<br>
_______________________________________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@python.org" target="_blank">Matplotlib-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br>
</blockquote></div>
</div></div><br></div></blockquote></div>