Code covered by the BSD License  

Highlights from
Multichannel Wave Plotting

Be the first to rate this file! 7 Downloads (last 30 days) File Size: 2.83 KB File ID: #27676 Version: 1.10
image thumbnail

Multichannel Wave Plotting



20 May 2010 (Updated )

Plot stacked waves/data from a multichannel matrix

| Watch this File

File Information

h = multiwaveplot(...)

Multiwaveplot draws a series of stacked waves (one on top of the other) contained in the rows of an input 2-D matrix. Each wave has a designated row on the plot; the first row is plotted at the bottom of the plot.

multiwaveplot(wave) draws a series of waves contained in the rows of wave.

multiwaveplot(x,y,wave) plot the waves against the data in x and y, such that x specifies the common x data, and y determines the vertical position of each row. Hence, length(x)==size(wave,2) and length(y)==size(wave,1).

multiwaveplot(...,gain) scales the height of each wave according to gain. With gain=1 (default), the height of the tallest wave will be limited so as not to encroach on the adjacent wave; all other waves are scaled accordingly. This can be overridden by specifying gain > 1.

multiwaveplot(...,mode) plots the data with the specified mode. The default mode depends on gain: for gain <= 1, mode defaults to 'plot' and plots lines for each row of wave; for gain > 1, mode defaults to 'fill' and instead plots white patch objects for each row of wave, covering the area under each wave, such that waves with a lower row index mask those with a higher row index. This behaviour can be overridden by specifying MODE as a string (either 'plot' or 'fill').

h = multiwaveplot(...) returns a vector of handles to patch (for mode = 'fill') or lineseries (for mode = 'plot') graphics objects, one handle per wave.


MATLAB release MATLAB 7.8 (R2009a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
21 May 2010 1.1

Added optional plotting mode argument: 'fill' or 'plot'. 'plot' is useful for fine structure plotting, 'fill' is useful for correlograms. Tidied up input validation.

21 May 2010 1.2

Ooops, forgot to check the MODE argument

27 May 2010 1.3

Tidied up, updated description

05 Jul 2011 1.4

Minor updates to example and validation; new screenshot.

18 Jan 2012 1.5

Some bug fixes and efficiency savings. Updated documentation.

23 Apr 2013 1.7

Corrected ylim so that top row is not cropped when gain is applied.

26 Jun 2013 1.8

Added trap for cases where input contents are all zero (or, at least one row is).

16 Jan 2014 1.9

Corrected two bugs: one where scale would be recursively updated depending on magnitude order in wave, and the other where y axis min was erroneous if gain was set.

27 Jan 2014 1.10

Minor tweak to how y-axis min is calculated.

Contact us