I'm plotting timeseries with gaps. Observations come from 6 different dates and lags between consecutive datapoints within each day are on average about 10 seconds.
On some days observations window is just a part of day, e.g. from 00:00 to 7:40, which results in huge gaps in merged series containing all days. I'd like to plot merged data, but leave gaps between days empty. Instead now there is some kind of linear interpolation - on the plot below you can see blue plot of data and red dots above x-axis values that are really present in data:
I find it misleading, for example sometimes lines in gaps are on y = 0 and due to it I initially though that device (this is power consumption data) was inactive in that periods and value of y was 0 (when in reality we just don't have data for that periods at all).
What can I do to prevent matplotlib from plotting lines in gaps? This is how I created the blue plot:
dev_data.plot(kind = "line", ax = axes[0], legend = None, title = "Device data")
Edit: I've found someone with opposite problem. I want my plot to look like in this question but I don't know what should I change in my code.

Matplotlib doesn't print missing (NaN or masked) values, see this demo.
To use this, you find the gaps (for example, difference between timestamps > 10 s) and add additional NaN-values at timestamps within these gaps.