Starting And Animation#

squap.show()[source]#

Shows window and starts loop. Use in combination with squap.widgets.Box.bind(), squap.on_refresh() or for static plots.

squap.on_refresh(func, disconnect=False)[source]#

Adds or removes a function that will be called on window refresh.

Parameters:
  • func (callable) – The function that will be called on refresh.

  • disconnect (bool, optional) – Whether the function should be connected (False) or disconnected (True). If you try to disconnect a function that cannot be disconnected, nothing happens. Defaults to False.

squap.set_interval(interval)[source]#

Set interval between frames.

Parameters:

interval (float) – The time interval (in seconds) to set for updating the plot.

squap.show_window()[source]#

Shows the window and refreshes it. It is Non-blocking, so use in combination with your own loop and squap.refresh().

squap.refresh(
wait_interval=True,
call_update_funcs=True,
)[source]#

Refresh everything shown on screen, and wait according to interval (set with squap.set_interval())

Parameters:
  • wait_interval (bool, optional) – If set to False, doesn’t wait for time set by squap.set_interval(). Defaults to True.

  • call_update_funcs (bool, optional) – If set to True, calls all functions bound by squap.on_refresh() when this function is called. Defaults to True.