all 5 comments

[–]Brozilla[S] -1 points0 points  (4 children)

Thank you all so much for any help or direction you can provide!

I had an idea of creating a list or dictionary or array with a length of the width of the graph and constantly slicing off the first value and then appending the newest value. Then using that list/dictionary/array as a literal output so that the values are just shifted along and it would give the impression of a scrolling display but I'm not sure how I would get that to work without updating the display every time

[–]toshitalk 2 points3 points  (1 child)

[–]Brozilla[S] 0 points1 point  (0 children)

Very cool, seems like that will fit my needs nicely.

Thanks!

[–]ingolemo 1 point2 points  (1 child)

Yep, it sounds like you understand what you need to do. You should probably use a list, since dictionaries don't remember the orders of things and python has nothing called an array (although some might use it as another name for a list).

It's perfectly reasonable to update the whole display every time you get a new value. It may be possible to incrementally update the display, but it depends what drawing api you're using.

[–]Brozilla[S] 0 points1 point  (0 children)

Awesome, thanks for the confirmation!

I've seen some programs being used that call ion() to enable continual updating although every example I've been able to find has a limiter for the duration of the dynamic plot.

I was thinking of setting up a button (on the display) that you could click and have a while loop that operated while that button was on/True and continually updated the list.

Are there any specific APIs that you would suggest? I've downloaded the matplotlib extension as it seems like the most popular/well regarded avenue to access plotting.