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.
Parameter | Primary Format | Secondary Format |
---|---|---|
S11, S12, S21, S22 | Magnitude(decibels) | Angle(Degrees) |
LS11, LS12, LS21, LS22 | Magnitude(decibels) | Angle(Degrees) |
NF | Magnitude(decibels) | none |
OIP3 | dBm | W |
Pout | dBm | W |
Phase | Angle(Degrees) | none |
AM/AM | Magnitude(decibels) | none |
AM/PM | Angle(Degrees) | none |
GammaIn, GammaOut | Magnitude(decibels) | Angle(Degrees) |
Gt, Ga, Gp, Gmag, Gmsg | Magnitude(decibels) | none |
Delta | Magnitude(decibels) | Angle(Degrees) |
TF1, TF2 | Magnitude(decibels) | Angle(Degrees) |
GammaMS, GammaML | Magnitude(decibels) | Angle(Degrees) |
VSWRIn, VSWROut | Magnitude(decibels) | none |
GroupDelay | ns | none |
Fmin | Magnitude(decibels) | none |
GammaOPT | Magnitude(decibels) | Angle(Degrees) |
K, Mu, MuPrime | none | none |
RN | none | none |
PhaseNoise | dBc/Hz | none |
NTemp | K | none |
NFactor | none | none |
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:
Look up the primary and secondary formats for the specified parameters.
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.
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.
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.If all the preceding steps are not successful, issue an error message.