Helper Functions#
- squap.display_fps(
- update_speed=0.2,
- get_fps=False,
- optimized=False,
- ax=None,
Display frames per second (fps) at the top of the
plot widget.- Parameters:
update_speed (float) – The update speed for fps calculation. Defaults to
0.2seconds.get_fps (bool) – Whether to store the fps. If set to
True, the fps will be saved to var.fps every time it is updated. Defaults toFalse.optimized (bool) – Whether to use an optimized calculation method. If set to
True, it is a bit quicker, but less consistent for variable fps. Defaults toFalse.ax (
SubplotWidget, optional) – Which window to set the title to the fps. Defaults to top-left.
- Returns:
Function that is needed to update the fps. If the program is run using
squap.show(), this is handled automatically, but when you usesquap.show_window(), it needs to be run withsquap.refresh(), either manually or by callingsquap.refresh(call_update_funcs=True).- Return type:
- Raises:
NotImplementedError – If the function is called in 3D plot style, which is not supported yet.