メインコンテンツ

show

Plot analysis result

Since R2026a

    Description

    Add-On Required: This feature requires the Optical Design and Simulation Library for Image Processing Toolbox add-on.

    chart = show(result) plots the analysis result result in a chart.

    chart = show(result,Name=Value) sets properties of the chart using one or more optional name-value arguments. For example, Title="Chromatic Aberration" specifies the chromatic aberration results plot title as "Chromatic Aberration".

    Input Arguments

    collapse all

    Analysis result to plot, specified as a ChromaticAberration object, a FieldCurvature object, a LensDistortion object, or a RayAberration object.

    Name-Value Arguments

    expand all

    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

    expand all

    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 from 0 to F. 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 NameShort NameRGB TripletHexadecimal Color CodeAppearance
    "red""r"[1 0 0]"#FF0000"

    Sample of the color red

    "green""g"[0 1 0]"#00FF00"

    Sample of the color green

    "blue""b"[0 0 1]"#0000FF"

    Sample of the color blue

    "cyan" "c"[0 1 1]"#00FFFF"

    Sample of the color cyan

    "magenta""m"[1 0 1]"#FF00FF"

    Sample of the color magenta

    "yellow""y"[1 1 0]"#FFFF00"

    Sample of the color yellow

    "black""k"[0 0 0]"#000000"

    Sample of the color black

    "white""w"[1 1 1]"#FFFFFF"

    Sample of the color white

    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, Tab object, or TiledChartLayout object. By default, the function creates a new Figure object. You can create these UI containers using their respective creation functions.

    Additional Display Options for Spot Results

    expand all

    Index of the reference wavelength at which the RMS spot size was calculated, specified as a positive integer in the range (1, M), where M is the number of wavelengths. The spot diagram is centered at the chief ray of this wavelength.

    You can specify this name-value argument only when result is a Spot object.

    Plot the spot diagrams on a single axes, 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.

    When you specify CombineWavelengths as "off", the spot function plots the spot diagram for each wavelength on a separate axes.

    You can specify this name-value argument only when result is a Spot object.

    Marker symbol for each wavelength, specified as one of the options listed in the table. You can also specify multiple symbols as an M-element string vector where each element is a marker shape from the table. If you specify a single symbol, the chart displays all results using the same symbol. If you specify multiple symbols, then M must be equal to the number of wavelengths.

    MarkerDescriptionResulting Marker
    "o"Circle

    Sample of circle marker

    "+"Plus sign

    Sample of plus sign marker

    "*"Asterisk

    Sample of asterisk marker

    "."Point

    Sample of point marker

    "x"Cross

    Sample of cross marker

    "_"Horizontal line

    Sample of horizontal line marker

    "|"Vertical line

    Sample of vertical line marker

    "square"Square

    Sample of square marker

    "diamond"Diamond

    Sample of diamond marker

    "^"Upward-pointing triangle

    Sample of upward-pointing triangle marker

    "v"Downward-pointing triangle

    Sample of downward-pointing triangle marker

    ">"Right-pointing triangle

    Sample of right-pointing triangle marker

    "<"Left-pointing triangle

    Sample of left-pointing triangle marker

    "pentagram"Pentagram

    Sample of pentagram marker

    "hexagram"Hexagram

    Sample of hexagram marker

    "none"No markersNot applicable

    You can specify this name-value argument only when result is a Spot object.

    Output Arguments

    collapse all

    Result analysis chart, returned as a ChromaticAberrationChart object, FieldCurvatureChart object, LensDistortionChart object, or RayAberrationChart object.

    Version History

    Introduced in R2026a