I have GPS data of ice speed from three different GPS receivers. The data are in a pandas dataframe with an index of julian day (incremental from the start of 2009).
I found even if the df was indexed as DateTime the same issues occurred. One solution to ensure all data points are respected, with no gaps in between lines, is to plot each df column separately and dropping the NaNs.
for col in df.columns:
plot_data = df[col].dropna()
ax.plot(plot_data.index.values, plot_data.values, label=col)