Main Content

Determining Parameter Formats

When you call plotyy without specifying the formats for the specified parameter, plotyy determines the formats from the primary and secondary formats.

Primary and Secondary Formats

The following table shows the primary and secondary formats for the parameters for all circuit and data objects. Use the listparam method to list the valid parameters for a particular object. Use the listformat method to list valid formats.

ParameterPrimary FormatSecondary Format
S11, S12, S21, S22Magnitude(decibels)Angle(Degrees)
LS11, LS12, LS21, LS22Magnitude(decibels)Angle(Degrees)
NFMagnitude(decibels)none
OIP3dBmW
PoutdBmW
PhaseAngle(Degrees)none
AM/AMMagnitude(decibels)none
AM/PMAngle(Degrees)none
GammaIn, GammaOutMagnitude(decibels)Angle(Degrees)
Gt, Ga, Gp, Gmag, GmsgMagnitude(decibels)none
DeltaMagnitude(decibels)Angle(Degrees)
TF1, TF2Magnitude(decibels)Angle(Degrees)
GammaMS, GammaMLMagnitude(decibels)Angle(Degrees)
VSWRIn, VSWROutMagnitude(decibels)none
GroupDelaynsnone
FminMagnitude(decibels)none
GammaOPTMagnitude(decibels)Angle(Degrees)
K, Mu, MuPrimenonenone
RNnonenone
PhaseNoisedBc/Hznone
NTempKnone
NFactornonenone

Determining Formats for One Parameter

When you specify only one parameter for plotting, plotyy creates the plot as follows:

  • The predefined primary format is the format for the left Y-axis.

  • The predefined secondary format is the format for the right Y-axis.

If the specified parameter does not have the predefined secondary format, plotyy behaves the same way as plot, and does not add a second y-axis to the plot.

Determining Formats for Multiple Parameters

To plot multiple parameters on two Y-axes, plotyy tries to find two formats from the predefined primary and secondary formats for the specified parameters. To be used in the plot, the formats must meet the following criteria:

  • Each format must be a valid format for at least one parameter.

  • Each parameter must be plotted at least on one Y-axis.

If cannot meet these criteria,plotyy it issues an error message.

The function uses the following algorithm to determine the two parameters:

  1. Look up the primary and secondary formats for the specified parameters.

  2. If one or more pairs of primary-secondary formats meets the preceding criteria for all parameters:

    • Select the pair that applies to the most parameters.

    • Use these formats to create the plot.

    Otherwise, proceed to the next step.

  3. If no pairs of primary-secondary formats meet the criteria for all parameters, try to find one or more pairs of primary-primary format that meets the criteria. If one or more pairs of primary-primary formats meets the preceding criteria for all parameters:

    • Select the pair that applies to the most parameters.

    • Use these formats to create the plot.

    Otherwise, proceed to the next step.

  4. If the preceding steps fail to produce a plot, try to find one format from the predefined primary formats. If a primary format is valid for all parameters, use this format to create the plot with the MATLAB plot function.

  5. If all the preceding steps are not successful, issue an error message.