Python matplotlib how to scatter plot 1D x vs 40 columns y

Viewed 20

There's any recommendation to elegantly avoid dimension error, x = 1x480 vector and y = 40x480 table of values. All in a dataframe.

My ugly solution

df_train.plot(x=['Time', 'Time','Time','Time','Time','Time','Time','Time','Time','Time',
            'Time', 'Time','Time','Time','Time','Time','Time','Time','Time','Time',
            'Time', 'Time','Time','Time','Time','Time','Time','Time','Time','Time',
            'Time', 'Time','Time','Time','Time','Time','Time','Time','Time','Time'], 
    y=['P1','P2','P3','P4','P5','P6','P7','P8','P9','P10','P11','P12','P13','P14','P15','P16','P17', 'P18','P19','P20','P21','P22','P23','P24','P25','P26','P27','P28','P29','P30','P31','P32', 'P33','P34','P35','P36','P37','P38','P39','P40'], 
    kind="scatter", 
    figsize=(16,18), s=1)
0 Answers
Related