There is more than one way to do this. Many people have suggested estimating a heat map / core density / 2d histogram. @Bucky suggested using a moving average. In addition, you can fill in between a moving min and a moving maximum, as well as build a moving average above the top. I often call it "chunkplot", but it's a terrible name. The implementation below assumes that your time (x) values โโare monotonically increasing. If this is not the case, simply sort the y by x before "chunking" in the chunkplot function.
Here are a few different ideas. This will best depend on what you want to emphasize in the plot. Note that this will start rather slowly, but mainly because of the scatter chart. Other building styles are much faster.
import numpy as np import matplotlib.pyplot as plt import matplotlib.dates as mdates import datetime as dt np.random.seed(1977) def main(): x, y = generate_data() fig, axes = plt.subplots(nrows=3, sharex=True) for ax in axes.flat: ax.xaxis_date() fig.autofmt_xdate() axes[0].set_title('Scatterplot of all data') axes[0].scatter(x, y, marker='.') axes[1].set_title('"Chunk" plot of data') chunkplot(x, y, chunksize=1000, ax=axes[1], edgecolor='none', alpha=0.5, color='gray') axes[2].set_title('Hexbin plot of data') axes[2].hexbin(x, y) plt.show() def generate_data():

source share