Contour Overlay

Countour OVERLAY - Overlays any figure with contour lines that can be generated from the same or a different data set.
60 Downloads
Updated 11 Apr 2020

View License

A simple program to overlay any figure with contour lines from the same or different data set as defined by the ContourMatrix, (see contourc). This allows information from two different images to be combined in one image.
Syntax:
coverlay(cm) - overlay current figure with contours defined by cm.
coverlay(cm,figh) - overlay figure pointed by figh with contours.
coverlay(...,LineSpec) - draws contours with line type and color as specified by LineSpec.
coverlay(...,Name,Value) - specify contour properties using one or more
property name, property value pairs, see Contour properties.

Typical usages is as follows:
cm = contourc(x,y,Z,n); - generate ContourMatrix
figh = imagesc(x,y,ZZ) or any other command that generates an image
ZZ may be a different matrix but with the same domain, x,y.
coverlay(cm,figh) - overlay the figure with contours.
clabel(cm,figh) - label the contours if desired.

Note:
It is important for the image domain to match the contours domain.
For example use the same X & Y vectors to specify both domains.

Cite As

Mirko Hrovat (2024). Contour Overlay (https://www.mathworks.com/matlabcentral/fileexchange/74961-contour-overlay), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2020a
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
1.0.1

updated picture

1.0.0