imat_fn/plot


Purpose

Plot an imat_fn in a special figure window.

Syntax

plot(f)

plot(f1,f2,...)

h=plot(f)

h=plot(f,handle)

plot(f,'xscale','lin','yscale','log','grid','none','complex','mp','xwin',[100 200],'ywin',[1e-1 1e4],'tag',tagstruct,'allphase')

Description

When you PLOT an imat_fn, the IMAT toolbox brings up the XY Plot window and plots all functions in f. Plot options (log/linear, etc.) are controlled through a graphical user interface.

If a figure handle is supplied, PLOT will display the plot(s) inside the existing figure rather than creating a new one. If a uipanel handle is supplied, the plot will be displayed inside the panel. If HI is an axis handle, PLOT will create a uipanel over it using its OuterPosition for the size and location, and will plot the functions in this uipanel.

You can control the plot axis scaling, grid, complex options, and window either through the GUI interface or through command-line arguments. The command-line arguments come in pairs. The first value of the pair is a string specifying the attribute, and the second is a value containing the value of the attribute. The following table summarizes the supported strings and their possible values.

By default PLOT will display a "cleaned" phase plot. Points where the phase differs by more than 270 degrees from the previous point are not displayed. This behavior can be controlled through the Options menu or through a supplied format string.

'legend' Set the legend type ('idline1','idline4','ref/res').
'xscale' Specify 'lin' for linear axis or 'log' for logarithmic axis.
'yscale' Specify 'lin' for linear axis or 'log' for logarithmic axis.
'grid' Specify 'x' for x-only grid, 'y' for y-only, 'xy' for x and y grid, and 'none' for no grid
'complex' Specify 'mp' for modulus + phase, 'm' for modulus only, 'p' for phase only, 'r' for real only, 'i' for imaginary only, 'ri' for real + imaginary, and 'nyq' for Nyquist
'xwin' Specify a 1x2 numeric vector containing the minimum and maximum X axis window values. The string 'tight' is also valid.
'ywin' Specify a 1x2 numeric vector containing the minimum and maximum Y axis window values. The string 'tight' is also valid.
'tag'

nx1 structure containing the following fields:

coord If doing tag on data, set to the X value. If doing tag on grid, set to [x_value y_value].
axis Specifies the axis number for the tag (either 1 or 2). Axis 2 is the upper axis.
func If doing tag on data, set to the function number to tag. Otherwise set to [].
type Specifies tag type: 'x', 'y', or 'xy'.
formatx [Optional]. If supplied, specifies the format string for X values. The format specifier should set the format for a single numeric value. The default is '  %g'.
formaty [Optional]. If supplied, specifies the format string for Y values. The format specifier should set the format for a single numeric value. The default is '  %g'.

 

'allphase' Display all of the phase values on phase plots. The default is false.
'template' Use a template to format the plot. Follow this string with the filename of an IMAT_FNPLOT template file or a template structure.
'nomenu' Do not create a menu bar on the figure

 

You can pass in a string that contains valid MATLAB characters for line color, linestyle, and marker. See the help for PLOT for a list of valid characters. This will cause all of the functions to use those attributes for the line display.

 

H is an optional output that contains the IMAT_FNPLOT object defining the plot. You can access the methods and properties of this object to modify the plot. The IMAT_FNPLOT class is documented here.

See Also

imat_fn/plot3, imat_fnplot