skrf.networkSet.NetworkSet.animate

NetworkSet.animate(*args, **kwargs)[source]

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, optional) – plotting property of a Network (ie ‘s_db’, ‘s_deg’, etc) Default is ‘s_deg’

  • ylims (tuple, optional) – passed to ylim. needed to have consistent y-limits across frames. Default is (-5 ,5).

  • xlims (tuple or None, optional.) – passed to xlim. Default is None.

  • show (bool, optional) – show each frame as its animated. Default is True.

  • savefigs (bool, optional) – save each frame as a png. Default is False.

  • *args – passed to the Network plotting function

  • **kwargs – passed to the Network plotting function

Note

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)