Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/list/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 以时间为x轴绘制多个列表_Python_List_Plot_Time_Axis - Fatal编程技术网

Python 以时间为x轴绘制多个列表

Python 以时间为x轴绘制多个列表,python,list,plot,time,axis,Python,List,Plot,Time,Axis,我试图在00:00-23:45(间隔15分钟)之间用x轴绘制许多列表 当这100个列表中的索引是一个整数时,它会很好地绘制,当我将所有列表中的索引从00:00更改为date.time到23:45时,我会得到一个类型错误:TypeError:float()参数必须是字符串或数字,而不是“datetime.time” Listi变量包括100个数据帧列表,尺寸为96124。看起来是这样的: 在这里,它看起来就像我正常绘制的那样: fig,ax = plt.subplots(figsize=(13,

我试图在00:00-23:45(间隔15分钟)之间用x轴绘制许多列表

当这100个列表中的索引是一个整数时,它会很好地绘制,当我将所有列表中的索引从00:00更改为date.time到23:45时,我会得到一个类型错误:TypeError:float()参数必须是字符串或数字,而不是“datetime.time”

Listi变量包括100个数据帧列表,尺寸为96124。看起来是这样的:

在这里,它看起来就像我正常绘制的那样:

fig,ax = plt.subplots(figsize=(13,8))
for l in listi:
    ax.plot(l) 

我希望X轴更像这样

我知道如何使用常规数据帧来实现这一点,但我还没有找到一种解决方案,如何使用许多列表来实现这一点

这是我尝试使用ax.setxticklabels(x)时失败的一次尝试,其中x是一个带有[datetime.time]的列表