https://github.com/otvam/scatter_simplify_matlab
MATLAB Code for Simplifying Scatter Plots
https://github.com/otvam/scatter_simplify_matlab
big-data matlab pareto-front reduction scatter-plot simplify
Last synced: 6 months ago
JSON representation
MATLAB Code for Simplifying Scatter Plots
- Host: GitHub
- URL: https://github.com/otvam/scatter_simplify_matlab
- Owner: otvam
- License: bsd-2-clause
- Created: 2021-02-04T10:52:23.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-18T04:44:22.000Z (10 months ago)
- Last Synced: 2025-03-28T00:41:25.655Z (6 months ago)
- Topics: big-data, matlab, pareto-front, reduction, scatter-plot, simplify
- Language: MATLAB
- Homepage:
- Size: 1.21 MB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# MATLAB Code for Simplifying Scatter Plots



**MATLAB scatter plots** with **millions of points** are slow and resource intensive.
However, most of the points are not visible since they are hidden by other points.
This code detects which points are **hidden** and **remove** them.The used **algorithm** is particularly **efficient** and can handle millions of points:
* a pixel matrix is generated
* the points are circle occupying a given number of pixels
* the indices of the points are placed (in order) in the pixel matrix
* the points that do not appear in the pixel matrix will be invisible in the plot
* the invisible points are removedIn other words, this algorithm work as a virtual graphic buffer.
The plot is precomputed and invisible elements are deleted.This algorithm (o(n) complexity) features several advantages:
* no need to compute the distance between all the points
* the memory requirement is linearly proportional to the number of pixels
* the memory requirement is linearly proportional to the number of scatter points
* computational cost is linearly proportional to the number of scatter pointsThis code has been successfully tested with **large datasets**:
* this algorithm is vectorized and many points are treated together.
* the number of points (chunk size) processed in a step can be selected.
* 100'000'000 points can be simplified in several minutes## Example
Look at the examples [run_example.m](run_example.m).
A dataset with random points is successfully simplified (by a factor of 40) without changing the scatter plot result.
![]()
![]()
## Compatibility
* Tested with MATLAB R2018b.
* No toolboxes are required.
* Compatibility with GNU Octave not tested but probably easy to achieve.## Author
**Thomas Guillod** - [GitHub Profile](https://github.com/otvam)
## License
This project is licensed under the **BSD License**, see [LICENSE.md](LICENSE.md).