May-06-2019, 02:32 PM
Having set of unknow data , need to plot Line chart based on three params
Example
but while plotting line chart it is saying as we need to have same set of X value and Y value
line, = axes.plot(xdata, ydata, 'r-')
Error :
ValueError: x and y must have same first dimension, but have shapes (4,) and (4,4)
Thanks for your help.
Example
Salesamount = [[28000.00,308000.00,582000.00,387000.00],[367000.00,3037000.00,4822000.00,2936000.00],[637000.00,3440000.00,4415000.00,3294000.00],[478000.00,1209000.00,478000.00,1209000.00]] CalendarYear = [2010,2011,2012,2013] Employee = [272,281,282,296]Here X value=CalendarYear,Y value=Salesamount, Labels =CalendarYear
but while plotting line chart it is saying as we need to have same set of X value and Y value
line, = axes.plot(xdata, ydata, 'r-')
Error :
ValueError: x and y must have same first dimension, but have shapes (4,) and (4,4)
Thanks for your help.