Data density plot

Plots data density of a two-dimensional distribution for human viewing.

You are now following this Submission

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 (2026). Data density plot (https://in.mathworks.com/matlabcentral/fileexchange/31726-data-density-plot), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.1

Toolbox

1.0.0.0