# pzoptions

Create list of pole/zero plot options

## Description

Use the pzoptions command to create a PZOptions object to customize your pole/zero plot appearance. You can also use the command to override the plot preference settings in the MATLAB® session in which you create the pole/zero plots.

## Creation

### Description

example

plotoptions = pzoptions returns a default set of plot options for use with the pzplot and iopzplot commands. You can use these options to customize the pole/zero plot appearance using the command line. This syntax is useful when you want to write a script to generate plots that look the same regardless of the preference settings of the MATLAB session in which you run the script.

example

plotoptions = pzoptions('cstprefs') initializes the plot options with the options you selected in the Control System Toolbox™ and System Identification Toolbox™ Preferences Editor. For more information about the editor, see Toolbox Preferences Editor. This syntax is useful when you want to change a few plot options but otherwise use your default preferences. A script that uses this syntax may generate results that look different when run in a session with different preferences.

## Properties

expand all

Frequency units, specified as one of the following values:

• 'Hz'

• 'rpm'

• 'kHz'

• 'MHz'

• 'GHz'

• 'cycles/nanosecond'

• 'cycles/microsecond'

• 'cycles/millisecond'

• 'cycles/hour'

• 'cycles/day'

• 'cycles/week'

• 'cycles/month'

• 'cycles/year'

Time units, specified as one of the following values:

• 'nanoseconds'

• 'microseconds'

• 'milliseconds'

• 'seconds'

• 'minutes'

• 'hours'

• 'days'

• 'weeks'

• 'months'

• 'years'

You can also specify 'auto' which uses time units specified in the TimeUnit property of the input system. For multiple systems with different time units, the units of the first system is used.

Number of standard deviations to use to plot the confidence region, specified as a scalar. This is applicable to identified models only.

Grouping of input-output (I/O) pairs, specified as one of the following:

• 'none' — No input-output grouping.

• 'inputs' — Group only the inputs.

• 'outputs' — Group only the outputs.

• 'all' — Group all the I/O pairs.

Input label style, specified as a structure with the following fields:

• FontSize — Font size, specified as a scalar value greater than zero in point units. The default font size depends on the specific operating system and locale. One point equals 1/72 inch.

• FontWeight — Character thickness, specified as 'Normal' or 'bold'. MATLAB uses the FontWeight property to select a font from those available on your system. Not all fonts have a bold weight. Therefore, specifying a bold font weight can still result in the normal font weight.

• FontAngle — Character slant, specified as 'Normal' or 'italic'. Not all fonts have both font styles. Therefore, the italic font might look the same as the normal font.

• Color — Text color, specified as an RGB triplet. The default color is dark grey with the RGB triplet [0.4,0.4,0.4].

• Interpreter — Text interpreter, specified as one of these values:

• 'tex' — Interpret characters using a subset of TeX markup. This is the default value of Interpreter.

• 'latex' — Interpret characters using LaTeX markup.

• 'none' — Display literal characters.

Output label style, specified as a structure with the following fields:

• FontSize — Font size, specified as a scalar value greater than zero in point units. The default font size depends on the specific operating system and locale. One point equals 1/72 inch.

• FontWeight — Character thickness, specified as 'Normal' or 'bold'. MATLAB uses the FontWeight property to select a font from those available on your system. Not all fonts have a bold weight. Therefore, specifying a bold font weight can still result in the normal font weight.

• FontAngle — Character slant, specified as 'Normal' or 'italic'. Not all fonts have both font styles. Therefore, the italic font might look the same as the normal font.

• Color — Text color, specified as an RGB triplet. The default color is dark grey with the RGB triplet [0.4,0.4,0.4].

• Interpreter — Text interpreter, specified as one of these values:

• 'tex' — Interpret characters using a subset of TeX markup. This is the default value of Interpreter.

• 'latex' — Interpret characters using LaTeX markup.

• 'none' — Display literal characters.

Toggle display of inputs, specified as either {'on'}, {'off'} or a cell array with multiple elements.

Toggle display of outputs, specified as either {'on'}, {'off'} or a cell array with multiple elements.

Title text and style, specified as a structure with the following fields:

• String — Label text, specified as a character vector. By default, the plot is titled 'Pole-Zero Map'.

• FontSize — Font size, specified as a scalar value greater than zero in point units. The default font size depends on the specific operating system and locale. One point equals 1/72 inch.

• FontWeight — Character thickness, specified as 'Normal' or 'bold'. MATLAB uses the FontWeight property to select a font from those available on your system. Not all fonts have a bold weight. Therefore, specifying a bold font weight can still result in the normal font weight.

• FontAngle — Character slant, specified as 'Normal' or 'italic'. Not all fonts have both font styles. Therefore, the italic font might look the same as the normal font.

• Color — Text color, specified as an RGB triplet. The default color is black specified by the RGB triplet [0,0,0].

• Interpreter — Text interpreter, specified as one of these values:

• 'tex' — Interpret characters using a subset of TeX markup. This is the default value of Interpreter.

• 'latex' — Interpret characters using LaTeX markup.

• 'none' — Display literal characters.

X-axis label text and style, specified as a structure with the following fields:

• String — Label text, specified as a character vector. By default, the axis is titled based on the time units TimeUnits.

• FontSize — Font size, specified as a scalar value greater than zero in point units. The default font size depends on the specific operating system and locale. One point equals 1/72 inch.

• FontWeight — Character thickness, specified as 'Normal' or 'bold'. MATLAB uses the FontWeight property to select a font from those available on your system. Not all fonts have a bold weight. Therefore, specifying a bold font weight can still result in the normal font weight.

• FontAngle — Character slant, specified as 'Normal' or 'italic'. Not all fonts have both font styles. Therefore, the italic font might look the same as the normal font.

• Color — Text color, specified as an RGB triplet. The default color is black specified by the RGB triplet [0,0,0].

• Interpreter — Text interpreter, specified as one of these values:

• 'tex' — Interpret characters using a subset of TeX markup. This is the default value of Interpreter.

• 'latex' — Interpret characters using LaTeX markup.

• 'none' — Display literal characters.

Y-axis label text and style, specified as a structure with the following fields:

• String — Label text, specified as a cell array of character vectors. By default, the axis is titled based on the time units TimeUnits.

• FontSize — Font size, specified as a scalar value greater than zero in point units. The default font size depends on the specific operating system and locale. One point equals 1/72 inch.

• FontWeight — Character thickness, specified as 'Normal' or 'bold'. MATLAB uses the FontWeight property to select a font from those available on your system. Not all fonts have a bold weight. Therefore, specifying a bold font weight can still result in the normal font weight.

• FontAngle — Character slant, specified as 'Normal' or 'italic'. Not all fonts have both font styles. Therefore, the italic font might look the same as the normal font.

• Color — Text color, specified as an RGB triplet. The default color is black specified by the RGB triplet [0,0,0].

• Interpreter — Text interpreter, specified as one of these values:

• 'tex' — Interpret characters using a subset of TeX markup. This is the default value of Interpreter.

• 'latex' — Interpret characters using LaTeX markup.

• 'none' — Display literal characters.

Tick label style, specified as a structure with the following fields:

• FontSize — Font size, specified as a scalar value greater than zero in point units. The default font size depends on the specific operating system and locale. One point equals 1/72 inch.

• FontWeight — Character thickness, specified as 'Normal' or 'bold'. MATLAB uses the FontWeight property to select a font from those available on your system. Not all fonts have a bold weight. Therefore, specifying a bold font weight can still result in the normal font weight.

• FontAngle — Character slant, specified as 'Normal' or 'italic'. Not all fonts have both font styles. Therefore, the italic font might look the same as the normal font.

• Color — Text color, specified as an RGB triplet. The default color is black specified by the RGB triplet [0,0,0].

Toggle grid display on the plot, specified as either 'off' or 'on'.

Color of the grid lines, specified as an RGB triplet. The default color is light grey specified by the RGB triplet [0.15,0.15,0.15].

Selection mode for the x-axis limits, specified as one of these values:

• 'auto' — Enable automatic limit selection, which is based on the total span of the plotted data.

• 'manual' — Manually specify the axis limits. To specify the axis limits, set the XLim property.

Selection mode for the y-axis limits, specified as one of these values:

• 'auto' — Enable automatic limit selection, which is based on the total span of the plotted data.

• 'manual' — Manually specify the axis limits. To specify the axis limits, set the YLim property.

X-axis limits, specified as a cell array of two-element vector of the form [min,max].

Y-axis limits, specified as a cell array of two-element vector of the form [min,max].

## Object Functions

 iopzplot Plot pole-zero map for I/O pairs with additional plot customization options pzplot Pole-zero plot of dynamic system model with additional plot customization options

## Examples

collapse all

Plot the poles and zeros of the continuous-time system represented by the following transfer function with a custom option set:

$sys\left(s\right)=\frac{2{s}^{2}+5s+1}{{s}^{2}+3s+5}.$

Create the custom option set using pzoptions.

plotoptions = pzoptions;

For this example, specify the grid to be visible.

plotoptions.Grid = 'on';

Use the specified options to create a pole-zero map of the transfer function.

h = pzplot(tf([2 5 1],[1 3 5]),plotoptions);

Turning on the grid displays lines of constant damping ratio (zeta) and lines of constant natural frequency (wn). This system has two real zeros, marked by o on the plot. The system also has a pair of complex poles, marked by x.

## Version History

Introduced in R2008a