I have the following simple python script.
import matplotlib.pyplot as plt
import random
size_of_numbers_to_be_plotted = 200
my_array = []
i = 0
while i < size_of_numbers_to_be_plotted:
my_array.append(random.randint(1, 10))
i += 1
plt.plot(my_array)
plt.ylabel('Random numbers')
plt.show()
It simply plots an array of numbers which could contain a random value between 1 to 10.
The plot looks okay with a few numbers in the array. Like say if size_of_numbers_to_be_plotted
is set to 200 the plot looks okay and spaced out enough to understand like this.
But, it becomes pretty cramped for room if size_of_numbers_to_be_plotted
is set to 2000.
Question:
How can I make the plot in such a way that it allocates some space between each number plotted rather than stuffing up all the numbers in a cramped for room plot?
That might require the plot to be made scrollable I guess since 2000 numbers would not all fit in a horizontal length covering my whole screen?