Graphics    

Plotting Imaginary and Complex Data

When the arguments to plot are complex (i.e., the imaginary part is nonzero), MATLAB ignores the imaginary part except when plot is given a single complex argument. For this special case, the command is a shortcut for a plot of the real part versus the imaginary part. Therefore,

where Z is a complex vector or matrix, is equivalent to

For example, this statement plots the distribution of the eigenvalues of a random matrix using circular markers to indicate the data points.

To plot more than one complex matrix, there is no shortcut; the real and imaginary parts must be taken explicitly.


  Line Plots of Matrix Data Plotting with Two Y-Axes