Hello my friends and welcome!
In this video, I’m going to show you a simple code to make a real time plot or figure in Python.
It is very easy and quick to customize this python code to show what you want. Let’s see.
Python code
import time
import matplotlib.pyplot as plt
import random
fig = plt.figure()
ax = fig.add_subplot()
fig.show()
x = []
n = 150 # number of data points
for i in range(n):
x.append(random.randint(0,100))
ax.plot(x, color='r')
fig.canvas.draw()
ax.set_xlim(left=max(0, i - 50), right=i + 3)
time.sleep(0.01)
plt.show()
P/s: If you find the post useful, share it to remember and to help other people as well.
Hello everyone! In this post, I am going to show you my innovative version of…
Hello everyone. Let’s take a test to check your understanding about genetic algorithm, with multiple…
Hello everyone! In this post, I am going to show you my innovative version of…
Hello everyone. In this post, I am going to show you my innovative version of…
Hello everyone! Let’s see how my innovative version of Genetic Algorithm, called Adaptive Re-start Hybrid…
Hello everyone! Let’s take a short quiz, to test your knowledge about crypto-currency, or crypto.…