stackedplot

STACKEDPLOT produces a 3D-like view of a 2D stacked set of spectra.

Contents

Syntax

figh = stackedplot(z,style,spacing,labels,varargin) 

Description

Stacked plots are commonly seen in NMR spectroscopy. They often illustrate the evolution of spectra with time or some other parameter. There are several (somewhat equivalent) methods to produce such plots in Matlab. This function serves as a common interface to these various methods. Certainly some methods may be evoked directly, e.g. mesh, but some others are not as obvious, e.g. plot3. In addition a method (style 1) has been added that produces the traditional stacked plot format.

The purpose of this function is to educate through sample code and to provide
the user access to these additional choices. Select the method you like best.

 Plots are made on the current figure, if no figure exists then one is created.

Examples

Stacked plots of in-vivo 31P NMR spectra collected during exercise and recovery.

stackedplot(z,1,10,[-11.1,20.2,-3,3],[0.1,1.2],3)
    Style 1 (traditional) stacked plot of every tenth spectra with x  & y offsets of 0.1 & 1.2, and x & y tick labels with 3 ytick labels. To change angle of view change x & y offsets.

Style 1 Stacked Plot 

stackedplot(z,2,10,[-11.1,20.2,-3,3])
    Style 2 (mesh surface plot) stacked plot, every tenth spectra, with x  & y tick labels.
    View can be rotated.  

Style 2 stacked plot 

stackedplot(z,3,10,[-11.1,20.2]')
    Style 3 (mesh surface plot with column mesh style) stacked plot, every tenth spectra, with x tick labels (note column tick vector).
    View is rotated. 

Style 3 stacked plot 

stackedplot(z,4,15,[-3,3],'r')
    Style 4 stacked plot (uses plot3), every 15th spectra, with y tick labels (note row tick vector).
    View is rotated.  

Style 4 stacked plot

stackedplot(z,5)
    Style 5 stacked plot (uses imagesc).

Style 5 stacked plot 

See Also

mesh, plot3, imagesc

© 2020 Mirtech, Inc.