Function
A Function () plot is created under a 1D Plot Group or 2D Plot Group node when you click Create Plot () in a function node, depending on if the function depends on 1 or 2 variables. For 2D Function plots, add Height Expression, Filter, and Transparency (if a Height Expression node is used) subnodes if desired. Right-click a 1D Plot Group or 2D Plot Group to add this plot type.
Go to Common Results Node Settings for links to information about these sections: Data, Title, Range (2D only), and Coloring and Style. Also see the section Expressions and Predefined Quantities.
The following sections are only available for 1D Function plots:
y-Axis
This section is only available if the Two y-axes check box is selected in the Plot Settings section of the parent 1D Plot Group node’s Settings window.
Select the Plot on secondary y-axis check box to plot the y-axis data on the secondary y-axis to the right of the plot instead of the primary y-axis to the left of the plot.
y-Axis Data
Enter the expression to plot in the Expression field. For a Function plot created from a function definition node, the expression is already present, such as an1(x) for an analytic function with the function name an1. Click the Replace Expression () button or the Add Expression () button to replace or add to the expression using some predefined expression. Also add a Unit and Description if desired.
X-Axis Data
Enter the expression for the x-axis in the Expression field. For a Function plot created from a function definition node, the expression is already present, such as x for an analytic function with the argument x. Click the Replace Expression () button or the Add Expression () button to replace or add to the expression using some predefined expression. Also add a Unit and Description if desired. Enter values in the Lower bound and Upper bound fields to define the range of the argument for the function.
Output
In this section, you can control what to display for the function plot. From the Display list, choose one of the following display types:
Line (the default), to display the function using a line plot.
Line and points, to display the function using a line plot and points defined using the Point definition list. The points can, for example, come from a Cut Point 1D dataset that points to a Grid 1D dataset.
Points, to display the function using a points defined using the Point definition list. The points can, for example, come from a Cut Point 1D dataset that points to a Grid 1D dataset.
Discrete Fourier transform, to display a discrete Fourier transform (DFT) of the function. If you select to display a DFT, choose one of the following options from the Show list:
-
Real part, to show the real part of the output only.
-
Imaginary part, to show the imaginary part of the output only.
-
Amplitude, to show the amplitude of the output (the default).
-
Phase, to show the phase of the output.
-
Frequency spectrum, to display the function’s frequency spectrum by computing the number of frequencies and the frequency range based on the FFT (fast Fourier transform) of the function. The transform is valid for all functions, but what you get corresponds to a periodic continuation of the function outside the chosen bounds. To specify these values manually, select the Number of frequencies check box and enter a value in the associated field (the default is based on the number of time samples). From the Scale list, choose None (the default), Multiply by sampling point, or Divide by number of frequencies. You can choose to scale with the sampling period to show Fourier transform values instead of a pure DFT transform. Select the Scale check box to scale the values on the y-axis so that their magnitude reflects the magnitude of the original signal. The values then have the same unit as the input data for the FFT. For a pure sinusoid, the scaled value is the peak magnitude divided by the square root of 2 (). Select the Frequency range check box and then enter the bounds of the frequency range in the Minimum and Maximum fields (in Hz). The FFT algorithm uses resampling based on linear interpolation. The x-axis shows the frequency (in Hz). By default, the y-axis shows the unscaled Fourier coefficients.
If you have selected Amplitude or Frequency spectrum, you can select the In dB check box to present the values in dB. From the dB type list, choose 10log (the default) or 20log. The display in dB requires a reference value. From the dB reference list, choose Maximum (the default) to use the maximum value as the reference, or choose Manual to enter a suitable reference value in the Reference value field.
If you have selected Real part, Imaginary part, Amplitude or Phase, the following additional settings are available: To specify this value manually, select the Number of uniform samples check box and enter a value in the associated field. If desired, select the Inverse transform check box to use an inverse DFT. Select the Mask DC check box to set the DC value (zero frequency component) to zero (not available if Inverse transform is selected). The Ignore last sample check box is selected by default to not include the last sample in the transform (not available if Inverse transform is selected). The Shift zero frequency and Scale with sampling period check boxes are selected by default. Clear one or more of these check boxes if you want to exclude those steps.
If you have selected Line or Line and Points, also select an extrapolation of the function from the Extrapolation list:
None for no extrapolation (the default).
Left to extrapolate to the left of the function’s bounds.
Right to extrapolate to the right of the function’s bounds.
Left and right to extrapolate to the left and right of the function’s bounds.
Coloring and Style
In addition to the standard settings for the line style and color under Line style, these additional settings are available:
Choose an Extrapolation color if desired. It is the color of the extrapolation zones (if any).
Choose a Point color to specify the color of the points.
Legends
Select the Show legends check box to display the plotted expression to the right of the plot.
When Automatic is selected from the Legends list (the default), select or clear the Description, Expression, and Unit check boxes under Include to control what to include in the automatic legends (by default, it includes the description only). You can also add a prefix or a suffix to the automatic legend text in the Prefix and Suffix fields. If Manual is selected from the Legends list, enter your own legend text into the table.
The following sections are only available for 2D Function plots:
Axes
In this section, you can specify the units for the plot axis in the x unit and y unit fields.
Coloring and Style
This section contains the same settings as those for a Surface plot, except that the Wireframe setting is not available.