Update: Removing the screenshot, Below is the code from the screenshot:
import numpy as np
import matplotlib.pyplot as plt
x = np.arange(5)
y = np.array([[1,2],[1,2,3],[1,2,3,4],[1,2,3,4,5],[1,2,5,7,9]])
plt.plot(x,y) #gives ValueError: setting an array element with a sequence.
#A relaistic example
age = [20,30,40,50,60]
salary = np.array([[200,350,414],[300,500,612,700],[500,819],[900,1012],[812,712]])
plt.plot(age,salary) #gives ValueError: setting an array element with a sequence.
I am having two arrays each of size 5, elements of y are arrays, and I want them to be plotted against each x, for example at x = 0, I want to plot all the points from y[0], is there a way?
Update: Added another example above to show a realistic case , where I need to plot different salaries of different age people, each age people can have more than one salary.