You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide a ChartContext method to downsample the representation of the source data to a custom bucket size (not sure if something like this exists already, but could not find it).
Sometimes we are dealing with data sampled very frequently over long periods of time, which can make our chart look too cluttered.
To fix this in one of my projects, I wrote the following function for DateTime data (x axis).
But it has a direct impact on how the chart displays the data.., and reducing the number of plotted samples seems like something people would need to do frequently
Downsampling is tricky business. In my experience (mostly python), plotting libraries don't go into the subsampling aspects because it can distort the data in unexpected ways. In the python ecosystem, I think only Datashaders do the subsampling for you. And you have to chose how. Read the example on https://datashader.org/user_guide/Timeseries.html#create-some-fake-timeseries-data for some context.
Activity
nielsle commentedon Feb 16, 2026
Hmm... the downsample function doesn´t require plotters, so alternatively it could just be published it as a separate library.
viktaur commentedon Feb 16, 2026
But it has a direct impact on how the chart displays the data.., and reducing the number of plotted samples seems like something people would need to do frequently
el-hult commentedon Mar 18, 2026
Downsampling is tricky business. In my experience (mostly python), plotting libraries don't go into the subsampling aspects because it can distort the data in unexpected ways. In the python ecosystem, I think only Datashaders do the subsampling for you. And you have to chose how. Read the example on https://datashader.org/user_guide/Timeseries.html#create-some-fake-timeseries-data for some context.
IMHO, plotters should not do subsampling.