CoolFace
Apppublic

Aluode/PerceptionLabPortable

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
scrollingPlots.cpython-310.pyc33 linesDownload Raw Back to __pycache__
1o

2�Yiu3�@s�dZddlmZddlZddlZejdd�Ze�	d�e�4�Ze�5�Zej
jdd�ae�t�Ze�t�Zdad	d6�Ze��e�7�Ze�8�Zejdd�ejdd�e�d�e�d�ejd
dgd�ejdd�e��Ze��Ze�d�ada dd�Z!dZ"dZ#e�Z$e��ej9dd�a%t%�&ddd�t%�'dd�ga(e�e"ddf�a)da*dd�Z+dd�Z,ej-�.�Z/e/j0�1e,�e/�2d�e3d kr�e�4�dSdS)!z-10Various methods of drawing scrolling plots.11�)�perf_counterNT)�showz"pyqtgraph example: Scrolling Plotsi,)�sizecCsNtdd�tdd�<tj��td<t�t�td7at�t�t�td�dS)N������r)	�data1�np�random�normal�curve1�setData�ptr1�curve2�setPos�rr��E:\DocsHouse\542 percep lab latest\PerceptionLab\PerceptionLab_Portable\python_embed\Lib\site-packages\pyqtgraph/examples/scrollingPlots.py�update1s1213rZpeak)�modei����)ZxRange)ZxMax�dcCs�tj��tt<td7attjdkr't}t�tjdd�a|td|jd�<t�tdt��t�	td�t14�tdt��dS)Nrr�)rr	r15�data3�ptr3�shape�empty�curve3rr�curve4)�tmprrr�update25sr�16r)Zcolspan�bottomZTime�si����rcCst�}tD]}|�|td�qtt}|dkrJt��}t�|�t	d}t17�tddf�a	|t	d<tt�t
krIt�d�}t�|�tt�t
ks9ntd}|tt	|ddf<t18j��t	|ddf<|jt	d|d�dft	d|d�dfd�td7adS)Nrrrr)�x�y)r�curvesr�	startTime�ptr5�	chunkSize�p5�plot�append�data5rr�len�	maxChunks�popZ19removeItemr	r20r)�now�c�iZcurve�lastrrr�update3Os(212223��.r2cCst�t�t�dS)N)rrr2rrrr�updatehs24r3�2�__main__)5�__doc__�timer�numpyrZ	pyqtgraphZpgZGraphicsLayoutWidget�winZsetWindowTitleZaddPlot�p1Zp2r	r25rr(rrr
rZnextRowZp3Zp4ZsetDownsamplingZ
setClipToViewZsetRangeZ	setLimitsrrrrrrr&r,r$r'ZsetLabelZ	setXRanger#r*r%r2r3ZQtCoreZQTimerZtimer�timeout�connect�start�__name__�execrrrr�<module>sZ2627282930313233�
Aluode/PerceptionLabPortable · CoolFace