show & scroll - Visualize arbitrary N-dimensional arrays

Visualization functions for 3D, 4D, 5D and arbitrary N-D arrays
456 Downloads
Updated 1 Jul 2016

View License

Powerful visualization for numerical arrays of arbitrary dimensionality. Data can be 3D, 4D, 5D or arbitrary N-dimensional arrays.
Dimensions 1 and 2 are arranged as in images, dimensions 3 and 4 can be optionally tiled (see figure and see examples below), all trailing dimensions can be scrolled through using the mouse wheel and the keyboard (e.g. +/- keys for dimension 5, "a"/"q" keys for dimension 6, "s"/"w" keys for dimension 7 etc.)

Additional functionality:
* Several figure windows can be switched between using arrow keys
* Array coordinates and values can be explored using the mouse cursor
* Color axis scaling can be controlled using Shift+Mousewheel, Ctrl+Mousewheel, Ctrl+Shift+Mousewheel, Alt+Mousewheel
* Complex-valued arrays are supported (requires FileExchange submission 20292 "hsl2rgb and rgb2hsl conversion")

Examples:

% 5-D array of size 10x10x10x10x10
A=randn([10,10,10,10,10]);

show(A) % visualize using 4-D tiles
show(A,'3d') % visualize using 3-D tiles
scroll(A) % visualize using 2-D tiles

% complex-valued array
% (requires FileExchange submission 20292 "hsl2rgb and rgb2hsl conversion")
C=randn([10,10,10,10,10]).*exp(2*pi*1i*rand([10,10,10,10,10]));

show(C) % encode magnitude as brightness and complex phase as color hue
showm(C) % show magnitude only
show(C,0) % show magnitude only
show(C,1) % encode complex phase as color hue
show(C,2) % encode magnitude as colormap and phase as brightness
show(C,3) % phase only as color hue
show(C,4) % phase only as brightness

Cite As

Vladimir Golkov (2024). show & scroll - Visualize arbitrary N-dimensional arrays (https://www.mathworks.com/matlabcentral/fileexchange/52374-show-scroll-visualize-arbitrary-n-dimensional-arrays), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Images in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.1.0.0

Added image.
Removed external code from zip file.

1.0

Reformatted description.
Reformatted description.
included Alt+Mousewheel, Shift+Mousewheel, Ctrl+Mousewheel, Ctrl+Shift+Mousewheel
Reformatted description.