This page explains how to use the data visualizer and figure windows to view your simulation data.
Visualizer overview video
Simulation results can be visualized using 1D line, 2D surface and 3D plots. These plots can be created from within the results visualizer ("plot in new window" button), or from script.
Plot windows support standard operation such as axis labels, zoom, export to JPG, etc. Pressing the left mouse button to zooms in by a factor of two, the right button to zooms out by a factor of two, pressing and holding the left-hand mouse button results in a zoom window, and double-clicking either mouse button scales the plot to show all of the data. Some controls are slightly different for each type of plot (see more details in the next sections). For example, only the 3D vector plot provides controls for 3D rotation of the view; SHIFT key + mouse LEFT click allows pan view without 3D rotation. For image plots, the color map scale can be changed from color to grey, or red2blue.
The FILE menu contains an option to export the current figure to a JPG image file.
The SETTINGS menu contains options for setting the axes, colorbar limits, color map, labels, etc.
Visualizing rectilinear data
In this section we describe the visualizer tools for data structured in a rectilinear grid (eg. FDTD simulation results).
Available plot types
Line(xy plot): Choose this option to plot a 1D vector versus another 1D vector. For matrices with more than 1 dimension, a slice of the matrix will be automatically chosen. You can use the parameters table on the bottom to choose which dimension to slice and which to plot on the x or y axis. E.g., a spectrum (field vs wavelength)
Line(Polar plot): Choose this option to plot the angular distribution of some quantity. The angular coordinate is in degrees. The data must be provided as a function of the angle in radians. (Example: Mie scattering 3D)
Surface: Choose this option to create a 2D image plot of monitor data. For matrices with more than 2 dimensions, slices of the matrix will automatically be chosen. You can use the parameters table on the bottom to choose which dimensions to slice and which to plot on the x or y axis. E.g., a spatial field profile (field vs x,y), slice wavelength.
Vector: Choose this option to create a 2D/3D vector plot of monitor data. Choose the parameters table to slice a frequency point. It is possible to create a vector plot of quantities such as the electric field, magnetic field, poynting vector, etc.
MATLAB export / MATLAB export script: Only available for line-xy and surface plots. These buttons generate a MATLAB plot using the data plotted in the Visualizer; In addition, the MATLAB export script button creates a script that generates the plot in MATLAB. It requires MATLAB integration. To switch between these two buttons click and hold the button until you see the two options as shown below:
Export to JPG: It exports the figure to a JPG file. For line plots it is possible to export to PDF and EPS files as well. Click and hold the button to see the available options as shown below:
Show/hide chart settings: Opens the Visualizer settings described in the next section.
Get help with graph control options: Available for vector plots only. Shows a description of the control options to zoom in/out, rotate, pan, spin, switch between wireframe and solid view, and reset camera.
Smith chart additional options:
- ASPECT RATIO: Chose between 1:1 and fill scene.
- NORMALIZING IMPEDANCE (OHMS): Set the characteristic impedance of the system used for normalization.
Vector plots additional options: Choose to down sample the data, scale vectors by a given factor, show data points, invert background color, apply illumination, and use parallel projection.
Plot data redraw options : There are two options:
- Hold plot settings: When enabled, the current settings (e.g. color bar limits) are applied to any data set (or slice of it) plotted in the visualizer.
- Auto redraw: When enabled, the plot is refreshed automatically after any change in the settings or data set selection. If the option is disabled, it is necessary to click on the Redraw button to update the plot; this is particularly useful when visualizing large data sets.
Export to: Export figure to JPEG, text file or clipboard
This option is used to plot a series of lines with different indices from a 2D image plot in a 1D line plot. This is useful to give a clear comparison of the results with respect to different parameter values. To overplot lines:
- Change the "Plot Type" from "Image" to "Line"
- Select the index parameter "Action" to be "Slice"
- Turn on the "Overplot Lines" radio button
- Key in the indices for the lines, separated with a comma
Visualizing unstructured data
The visualizer for unstructured data is very similar to the one for rectilinear data described in the previous section. However, for unstructured data the only plot type available is surface and some toolbar buttons are not available. In addition, the visualizer settings are significantly different as described next.
Some of the visualizer settings are common to 2D and 3D simulation data. These are:
- SHOW: Can be "surface", which will contain the values at each mesh point only, or "surface and mesh", which will superimpose in black the mesh grids on top of the plots, or "mesh only" which will only plot the mesh grid in color.
- AXIS SCALE OPTIONS: Can be "square" which will make sure the two axis are plotted to the same size, or "equal" which will use the same scale for both such that the plot will be to scale.
- LOG SCALE: Will plot the result on a log scale.
- TITLE: The title of the plot can be specified.
- X/Y/Z LABEL: The x, y and z labels for the plot can be specified.
- COLOR BAR: The color bar limits can be specified and locked. Additionally, it is possible use a background and border for the color bar.
The specific options for 1D, 2D and 3D data are described below.
Options for 1D data
1D data captured by line monitors in solvers based on finite element method can follow a curved path. To express the recorded data in comprehensive way, the position on the curve is shown as value s normalized to the total length of the curve. Hence, the resulting plot shows the variable of our interest as a function of parameter s that has values between 0 and 1 representing the start and the end of the monitor curve.
The position of the start and end point s=0 and s=1 for closed curves is arbitrarily determined as a unique point with minimal in x, then minimal in y, then minimal in z.
Note: The exact x,y,z coordinates corresponding to each E field/s data point are available in the monitor results.
Options for 2D data
It is possible to choose between two plot types: surface and image. In the 2D image plot, the values are indicated using the color bar. In the surface plot, the values are also plotted in the third dimension. For a surface plot, it is possible to plot data as a radiation plot which will plot data in spherical coordinates and the distance of each data point from origin will determine it's value or intensity. This is specifically useful in the case of far field projections or a similar type of data where the intensity of data points at each direction in a 3D space is of interest.
Surface (xyz plot) and Image plot of the same data
Image plot and Radiation plot of the same guassian beam
Options for 3D data
- DATA VISUALIZATION: Choose between three options: unclipped (default), clipped volume and clipped plane. When a clipping option is selected a clip plane cuts through the 3D structure and gives insight into the inside of the 3D plot.
- CLIP PLANE: The clip plane can be shown on top of a 3D surface plot. This plane is defined by the coordinates of the origin and components of a vector perpendicular to the plane. For convenience, there are also the quick options for choosing a x normal / y normal / z normal plane. The inside out option will flip which side of the plane is shown. To change the plane position and/or orientation, move the arrow perpendicular to the plane, grabbing it with a mouse left click much like a drag action. For Pan view, hold the keyboard SHIFT key and mouse left click.
Clipped volume and Clipped plane
- 2D PLANE DATA: Use this option to export the cross-section 2D data at the clip plane to the script workspace or to show it in a new Visualizer window.
Understanding the Attribute editor
When using line plots, each attribute will appear as a separate line. When using image and vector plots, the selected attribute will be shown.
DATA SET: full data set name (can contain multiple attributes)
- ATTRIBUTE: attribute name
- VECTOR OPERATION: selects a particular component of a vector attribute e.g. (Ex, Ey, |E|^2)
- SCALAR OPERATION: selects a particular component of a scalar attribute e.g. (real, imag, abs, angle)
- SCALE: multiplier for the data being plotted
- LEGEND: this name will be shown in the legend of the plot
- NOTES: additional information added by the user about the attribute
- VIEW DATA: allows users to view the data in a table format as shown below
In this table format, users can select any portion of the data and "Copy" or "Export" it into a text file. Alternatively, users can also send any portion of the data into the Script Workspace.
Understanding the Parameter window
- ATTRIBUTES: Name of the associated attribute
- PARAMETERS: Name of the parameter
- ACTION: Control how the parameter is treated in the plot. For example, select which axis to plot the parameter on.
- VALUE: displays the value if it is a singular value or is blank if there is a vector of values
Plotting multi-dimensional attributes
One parameter must be selected to plot on the X axis. All other non-singleton parameters must be set to Slice. A specific slice can then be selected for those parameters.
Two parameters must be selected to plot on the X and Y axis. All other non-singleton parameters must be set to Slice. A specific slice can then be selected for those parameters.
The spatial dimensions (x,y,z) are always selected to plot on the X, Y, Z axes. All non-spatial parameters must be set to Slice. A specific slice can then be selected for those parameters.