Main Content

createLabels

Create legend labels for polar plot

Description

createLabels(p,format,array) adds the specified format label to each array of the polar plot p. The labels are stored as a cell array in the LegendLabels property of p.

example

Examples

collapse all

Create a polar plot of unique values. Generate a legend label for this plot.

p = polarpattern(rand(30,4),Style="filled");
createLabels(p,"az=%d#deg",0:15:45)

Figure Polar Measurement contains an axes object. The hidden axes object contains 4 objects of type patch. These objects represent az=0° Ⓐ , az=15° , az=30° , az=45° .

Input Arguments

collapse all

Polar plot, specified as a scalar handle.

Example: polarpattern

Format for legend label added to the polar plot, specified as a cell array. For more information on legend label format see, legend.

Example: "az=%d#deg"

Data Types: string

Values to apply the format, specified as an array. The values can be an array of angles or array of magnitudes.

Example: [0 15 30 45]

Data Types: double

Version History

Introduced in R2016a