Piled images

Plots multiple images in same axes, showing background, where foreground is NaN.
Updated 6 Mar 2007

No License

Imagescn plot two or more imagesc into the same axes. Deeper layers are visible, were higher layers have the value NaN. This is helpful e.g. to show measurement (=foreground) results "above" a map (=background), to separate NaN values within a 2D matrix from the lowest value (standard image shows the same color at NaN as it does for the lowest value). The number of layers is only limited by memory space :-).

The colormaps for the individual layers may be specified. The tick positions and tick labels for each layer can be described for each layer individually. The displayed range for each layer can be limited individually. Additionally, it is possible to combine linearly spaced color axes with nonlinearly spaced ones.

No use of transparency properties is made in this function. Nevertheless, a contourplot of individual layers may be added automatically, to give an impression of the hidden layer.

Example: If T is a 2D matrix containing the orography and C is another matrix of same size containing cloud thicknesses with values between 0 and 1, x and y are vectors containing the axis information, then
imagescn(x,y, T,bone(10),[0:100:1000],[],1, C,jet(100),[0 0.5 1], {'free','cloudy','covered'},0)
plots a background, showing the orography in 10 different gray codes, below a cloud mask with 100 colors. The colormap does not contain any informaton on the background but only for the clout thicknesses.

Cite As

Jan Handwerker (2024). Piled images (https://www.mathworks.com/matlabcentral/fileexchange/14138-piled-images), MATLAB Central File Exchange. Retrieved .

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

Improved due to some of matlab m-lint messages.