skrf.networkSet.NetworkSet.animate

NetworkSet.animate(attr='s_deg', ylims=(-5, 5), xlims=None, show=True, savefigs=False, dir_='.', *args, **kwargs)

animate a property of the networkset

This loops through all elements in the NetworkSet and calls a plotting attribute (ie Network.plot_`attr`), with given *args and **kwargs.

Parameters:
  • attr (str) – plotting property of a Network (ie ‘s_db’, ‘s_deg’, etc)
  • ylims (tuple) – passed to ylim. needed to have consistent y-limits accross frames
  • xlims (tuple) – passed to xlim
  • show (bool) – show each frame as its animated
  • savefigs (bool) – save each frame as a png
  • **kwargs (*args,) – passed to the Network plotting function

Notes

using label=None will speed up animation significantly, because it prevents the legend from drawing

to create video paste this:

!avconv -r 10 -i out_%5d.png -vcodec huffyuv out.avi

or (depending on your ffmpeg version)

!ffmpeg -r 10 -i out_%5d.png -vcodec huffyuv out.avi

Examples

>>>ns.animate(‘s_deg’, ylims=(-5,5),label=None)