Closed imvickykumar999 closed 1 year ago
From the code
def update_plot_data(self):
# limit lists data to 1000 items
limit = -1000
# Update the data.
self.x_data_line.setData(time_data[limit:], x_data[limit:])
self.y_data_line.setData(time_data[limit:], y_data[limit:])
self.z_data_line.setData(time_data[limit:], z_data[limit:])
When sensor events exceed 1000, graph will automatically appear shifting from left to right. So you have to wait until your device delivers 1000 events or change this value to 500 ( limit = -500)
I was using IP WebCam to fetch sensor data over https, and my code was able to clear previous graphs from left side while new graphs are plotting from right side of screen as shown in below video.
https://private-user-images.githubusercontent.com/50515418/285238923-8a9b9e2a-e765-4109-abbe-e0cbf6e278e5.mp4?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTEiLCJleHAiOjE3MDA5MjEzMzIsIm5iZiI6MTcwMDkyMTAzMiwicGF0aCI6Ii81MDUxNTQxOC8yODUyMzg5MjMtOGE5YjllMmEtZTc2NS00MTA5LWFiYmUtZTBjYmY2ZTI3OGU1Lm1wND9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFJV05KWUFYNENTVkVINTNBJTJGMjAyMzExMjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjMxMTI1VDE0MDM1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZlMDBiMmY5ZDAwNDE2NGEyNDBhYTA3OTkyZDU1ZjU4MTY3MzIwMWExY2FkMWQ0MWY2NGE4M2Y2YjcxYzc0YmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.bgArcP2lwfHOrREB1zlBAoVqrHJKWV4Ohl7YmLbH0SM
But when I am running your code, it is not clearing instead it's squeezing as shown below.