Data density plot

Plots data density of a two-dimensional distribution for human viewing.
Updated 29 Nov 2014

View License

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.

Cite As

Malcolm McLean (2024). Data density plot (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes