import numpy as np
import matplotlib.pyplot as plt
a = np.random.randint(2, 10, size=(1, 10))
b = np.random.randint(5, 15, size=(1, 10))
plt.title("Line Graph")
plt.xlabel("X Axis")
plt.ylabel("Y Axis")
plt.plot(a[0], b[0], color="red") # note a[0] instead of a
plt.show()
This gets output onto the graph, I believe this is what you are looking for. Depends on if you are intending on upscaling this at all. As a simple fix, this works though.
When printing out a and b, I got something like this:
[[2 6 8 4 7 6 8 6 6 2]]
Note the “[[” and “]]”, meaning that you were not giving the plot function an iterable, by doing a[0] you would give it: