Python 使用不同的时间采样绘制子地块条渲染

Python 使用不同的时间采样绘制子地块条渲染,python,plotly,Python,Plotly,根据我的测试,这与索引样本有关。以下是左侧(4小时)和右侧(每日)索引: DatetimeIndex(['2021-04-29 12:00:00','2021-04-29 16:00:00', '2021-04-29 20:00:00', '2021-04-30 00:00:00', '2021-04-30 04:00:00', '2021-04-30 08:00:00', '2021-04-30 12:00:00', '2021-04-30 16:00:00', '2021-04-30 20

根据我的测试,这与索引样本有关。以下是左侧(4小时)和右侧(每日)索引:

DatetimeIndex(['2021-04-29 12:00:00','2021-04-29 16:00:00',
'2021-04-29 20:00:00', '2021-04-30 00:00:00',
'2021-04-30 04:00:00', '2021-04-30 08:00:00',
'2021-04-30 12:00:00', '2021-04-30 16:00:00',
'2021-04-30 20:00:00', '2021-05-01 00:00:00',
...
'2021-05-22 12:00:00', '2021-05-22 14:05:00'
],
数据类型='datetime64[ns]',名称='time',长度=140,频率=无)
DatetimeIndex(['2021-01-04 08:00:00','2021-01-05 08:00:00',',
'2021-01-06 08:00:00', '2021-01-07 08:00:00',
'2021-01-08 08:00:00', '2021-01-09 08:00:00',
'2021-01-10 08:00:00', '2021-01-11 08:00:00',
'2021-01-12 08:00:00', '2021-01-13 08:00:00',
...
'2021-05-22 08:00:00', '2021-05-22 14:05:00'
],

dtype='datetime64[ns]',name='time',length=140,freq=None)
大家好,欢迎继续。这将是伟大的,如果你可以看看,然后尝试产生一个新的。