show
R2026bDescription
Add-On Required: This feature requires the Optical Design and Simulation Library for Image Processing Toolbox add-on.
sets properties of the chart using one or more optional name-value arguments. For example,
chart = show(result,Name=Value)Title="Chromatic Aberration" specifies the chromatic aberration results
plot title as "Chromatic Aberration".
Input Arguments
Analysis result to plot, specified as a object, ChromaticAberration object, FieldCurvature object, GeometricMTF object, GeometricPSF object, HuygensMTF object, HuygensPSF object, LensDistortionOPD object, or
object.RayAberration
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: show(ChromaticAberration,Title="Chromatic Aberration")
specifies the chromatic aberration results plot title as "Chromatic
Aberration".
Display Options for All Analysis Results
Chart title, specified as a string scalar or character vector. The default chart
title depends on the analysis result that you specify using the
result argument.
Data Types: char | string
Legend display, specified as "on" or "off", or
as numeric or logical 1 (true) or
0 (false). A value of "on"
is equivalent to true, and "off" is equivalent to
false. The value is stored as an on/off logical value of type
matlab.lang.OnOffSwitchState.
Line color, specified as an RGB triplet, a hexadecimal color code, or a color name. You can also specify multiple colors as an M-by-3 numeric matrix where each row is an RGB triplet, or as an M-element string vector where each element is a hexadecimal color code or color name. If you specify a single color, the chart displays all results using the same color. If you specify multiple colors, then M must be equal to the number of wavelengths.
For a custom color, specify an RGB triplet or a hexadecimal color code.
An RGB triplet is a three-element row vector whose elements specify the intensities of the red, green, and blue components of the color. The intensities must be in the range
[0,1], for example,[0.4 0.6 0.7].A hexadecimal color code is a string scalar or character vector that starts with a hash symbol (
#) followed by three or six hexadecimal digits, which can range from0toF. The values are not case sensitive. Therefore, the color codes"#FF8800","#ff8800","#F80", and"#f80"are equivalent.
Alternatively, you can specify some common colors by name. This table lists the named color options, the equivalent RGB triplets, and the hexadecimal color codes.
| Color Name | Short Name | RGB Triplet | Hexadecimal Color Code | Appearance |
|---|---|---|---|---|
"red" | "r" | [1 0 0] | "#FF0000" |
|
"green" | "g" | [0 1 0] | "#00FF00" |
|
"blue" | "b" | [0 0 1] | "#0000FF" |
|
"cyan"
| "c" | [0 1 1] | "#00FFFF" |
|
"magenta" | "m" | [1 0 1] | "#FF00FF" |
|
"yellow" | "y" | [1 1 0] | "#FFFF00" |
|
"black" | "k" | [0 0 0] | "#000000" |
|
"white" | "w" | [1 1 1] | "#FFFFFF" |
|
Example: Color="r"
Example: Color="green"
Example: Color=[0 0.4470 0.7410]
Grid lines to display, specified as one of these options.
"major"— The chart displays only major grid lines."minor"— The chart displays major and minor grid lines."off"— The chart does not display any grid lines.
Data Types: char | string
Parent UI container, specified as a Figure object,
Panel object, GridLayout object,
Tab object, or TiledChartLayout object. If you
do not specify this property, MATLAB creates a new figure. You can create these UI
containers using their respective creation functions.
UI Figure:
uifigureUI Panel:
uipanelUI Grid Layout:
uigridlayoutUI Tab:
uitabTiled Chart Layout:
tiledlayout
Additional Display Options for PSF Results
Wavelength channels to display, specified as a vector of positive integers. Each
index refers to an element of the Wavelengths property of the PSF
result object. By default, the chart displays all wavelength channels.
You can specify this name-value argument only when result is
a GeometricPSF object or a HuygensPSF object.
Data Types: double
Option to combine wavelength channels, specified as a logical value or a
"on"/"off" value. When this value is
"on", the chart sums the selected wavelength channels and displays
one image for each PSF object. When this value is "off", the chart
displays a separate image for each selected wavelength. The default value is
"on".
You can specify this name-value argument only when result is
a GeometricPSF object or a HuygensPSF object.
Colormap for PSF image display, specified as an N-by-3 numeric
matrix of RGB triplets. The default colormap is parula.
You can specify this name-value argument only when result is
a GeometricPSF object or a HuygensPSF object.
Data Types: double
Additional Display Options for MTF Results
Wavelength channels to plot, specified as a vector of positive integers. Each
index refers to an element of the Wavelengths property of the MTF
result object. By default, the chart plots all wavelength channels.
You can specify this name-value argument only when result is
a GeometricMTF object or a HuygensMTF object.
Data Types: double
Additional Display Options for OPD Results
OPD display style, specified as one of these values:
"fan"— Display OPD as a fan chart showing tangential and sagittal wavefront error."map"— Display OPD as a 2-D map.
N is the number of field points, and M is the number of wavelengths for which the OPD is computed.
You can specify this name-value argument only when result is
an OPD object.
Data Types: char | string
Number of points per axis for OPD display, specified as a positive integer. For fan style, this specifies the number of points along both the tangential and sagittal directions. For map style, this specifies the number of points in each dimension of the 2-D map.
You can specify this name-value argument only when result is
an OPD object.
Data Types: double
Output Arguments
Result analysis chart, returned as a ChromaticAberrationChart object, FieldCurvatureChart object, LensDistortionChart object, MTFChart object, OPDFanChart object, OPDMapChart object, PSFImage object, or RayAberrationChart object.
Version History
Introduced in R2026a
See Also
opticalSystem | chromaticAberration | fieldCurvature | lensDistortion | rayAberration | spotDiagram | opd | psf | mtf | GeometricPSF | HuygensPSF | GeometricMTF | HuygensMTF | PSFImage | MTFChart
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)