You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
A rug plot is a compact way of illustrating the marginal distributions of a variable along x and y. Positions of the data points along x and y are denoted by tick marks, reminiscent of the tassels on a rug.
Known Issues:
Rug marks are overlaid onto the same axis as the original data. Changing the axis dimensions after calling rug will therefore cause the tick marks to become disassociated from the axes.
I haven't tested this function extensively so let me know if you find any problems.
Cite As
Rob Campbell (2026). rug plots (https://au.mathworks.com/matlabcentral/fileexchange/27582-rug-plots), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired by: marginalscatter
General Information
- Version 1.3.0.0 (2.61 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
