I have two different time intervals that I want to build on the same chart.
Both of them are between 12: 30: 00 ~ 1: 25: 00, but their time sequence is different: one is 5 seconds, and the other is about 10.3 seconds. The type of both series is "pandas.core.series.Series". The time index type is a string and is executed from strftime. For example, Series A will:
12:30:05 0.176786 12:30:15 0.176786 12:30:26 0.176786 ... 13:22:26 0.002395 13:22:37 0.002395 13:22:47 0.001574
and Series B:
12:30:05 0.140277 12:30:10 0.140277 12:30:15 0.140277 ... 13:24:20 0.000642 13:24:25 0.000642 13:24:30 0.000454
I tried to build both rows in the same section:
import matplotlib.pyplot as plt A.plot() B.plot() plt.gcf().autofmt_xdate() plt.show()
and it works as follows:

Obviously, the blue lines in the first graph disappear at about 12:55:05, because series A has only half x points B and the graph () only arranges the graph based on the order of the x axis, and not the time interval.
It will be very clear if I make a series of only series A:

I want the two series to be shown on the same chart and ordered based on the true time interval. Ideally, the plot should be similar:

I hope I clearly said. If anything is confusing, please let me know.
source share