4 ms·
Hi, author here. You can think of density plots as a way to visualize the data traditionally visualized with line charts or spaghetti plots, but in a way that s
by yurivish 6y ago
Hi, author here. You can think of density plots as a way to visualize the data traditionally visualized with line charts or spaghetti plots, but in a way that scales more effectively to large datasets.
Traditional graphics pipelines aren't built to handle more than 256 incremental levels of opacity since it's an 8-bit channel, and when you have a thousand time series you can no longer distinguish between levels of density. Conditional information (following a single line) becomes difficult as well since there are so many lines. Density plots solve the overdraw problem by accumulating density into an offscreen buffer before rendering, which allows the color scale to be tuned to the amount of overlap in the specific dataset. Interactive selection/hover techniques can be used to recover conditional information.
This example is part of a density plot library published earlier this week (https://observablehq.com/@twitter/density-plot-introduction?collection=@twitter/density https://observablehq.com/@twitter/density-plot-introduction?...) and one of the references there is to an opacity-based approach I've seen used for 2D point clouds, though I haven't seen an analogous demo for curves: https://observablehq.com/@rreusser/selecting-the-right-opacity-for-2d-point-clouds https://observablehq.com/@rreusser/selecting-the-right-opaci...