maskoverlay
A MATLAB function to easily overlay a mask on a plot. Works with opaque or semitransparent masks of any specified color.
Here's an example where an opaque black mask and a semitransparent red mask have been overlaid on a pseudocolor background:
%% Opaque black mask:
maskoverlay(x,y,mask1)
% Semitransparent red mask:
maskoverlay(x,y,mask2,'color',[1 0 0],'alpha',0.5)
Cite As
Chad Greene (2026). maskoverlay (https://github.com/chadagreene/maskoverlay), GitHub. Retrieved .
MATLAB Release Compatibility
Created with
R2021a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Versions that use the GitHub default branch cannot be downloaded
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
|
To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.

