Data density can be hard to read from scatter plots due to overstriking. I therefore calculate data density at each pixel as the reciprocal of the sum of squared distance from each point, adding a fudge factor to prevent points actually within the pixel going to infinity.
The resulting plot allow for a visual fix on data density.
Malcolm McLean (2023). Data density plot (https://www.mathworks.com/matlabcentral/fileexchange/31726-data-density-plot), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!