Main Content

PosePatch Properties

Pose plot appearance and behavior

Since R2021b

PosePatch properties control the appearance and behavior of a PosePatch object. By changing property values, you can modify certain aspects of the pose plot. Use dot notation to query and set properties. To create a PosePatch object, use the poseplot function.

p = poseplot;
c = p.PatchFaceColor;
p.PatchFaceColor = "red";

Position and Orientation

expand all

Orientation of the pose plot, specified as a quaternion (Sensor Fusion and Tracking Toolbox) object or a rotation matrix.

Position of the pose plot, specified as a three-element real-valued vector.

Color and Styling

expand all

Scale factor of the pose plot, specified as a nonnegative scalar. The scale factor controls the size of the orientation box. When you specify the MeshFileName argument, the scale factor also changes the scale of the mesh.

Patch face color, specified as an RGB triplet, a hexadecimal color code, a color name, or a short name.

  • 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 character vector or a string scalar 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. Thus, the color codes "#FF8800", "#ff8800", "#F80", and "#f80" are equivalent.

Here is a list of commonly used colors and their corresponding values.

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

Name of Standard Triangle Language (STL) mesh file, specified as a string scalar or a character vector containing the name of the mesh file. When you specify this argument, the poseplot function plots the mesh instead of the orientation box.

Patch face transparency, specified as a scalar in range [0, 1]. A value of 1 is fully opaque and 0 is completely transparent.

Parent/Children

expand all

Parent axes, specified as an Axes object.

Children, returned as an empty GraphicsPlaceholder array or a DataTip object array. Currently, this property is not used and is reserved for future use.

Interactivity

expand all

Pose plot visibility, 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. Thus, you can use the value of this property as a logical value. The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState.

  • "on" — Display the object.

  • "off" — Hide the object without deleting it. You still can access the properties of an invisible object.

Visibility of the pose patch object handle in the Children property of the parent, specified as one of these values:

  • "on" — Object handle is always visible.

  • "off" — Object handle is invisible at all times. This option is useful for preventing unintended changes by another function. Set HandleVisibility to "off" to temporarily hide the handle during the execution of that function. Hidden object handles are still valid.

  • "callback" — Object handle is visible from within callbacks or functions invoked by callbacks, but not from within functions invoked from the command line. This option blocks access to the object at the command line, but permits callback functions to access it.

Standard Chart Properties

expand all

Pose plot name to display in the legend, specified as a string scalar or character vector. The legend does not display until you call the legend command. If you do not specify the display name, then legend sets the label using the format "dataN", where N is the order of pose plots shown in the axes. You can also directly specify the legend. For example: legend("Pose1","Pose2").

This property is read-only.

Type of pose plot object, returned as 'PosePatch'. Use this property to find all objects of a given type within a plotting hierarchy, for example, searching for the type using the findobj function.

This property is read-only.

Control for including or excluding the object from a legend, returned as an Annotation object. Set the underlying IconDisplayStyle property to one of these values:

  • "on" — Include the object in the legend (default).

  • "off" — Do not include the object in the legend.

For example, to exclude a graphics object, go, from the legend, set the IconDisplayStyle property to "off".

go.Annotation.LegendInformation.IconDisplayStyle = "off";

Alternatively, you can control the items in a legend using the legend function.

Pose plot series index, specified as a nonnegative integer. Use this property to reassign the marker colors of several PosePatch objects so that they match each other. By default, the SeriesIndex property of a PosePatch object is a number that corresponds to the order of creation of the object, starting at 0.

MATLAB uses the number to calculate indices for assigning colors when you call plotting functions if you do not specify the color directly. The indices refer to the rows of the arrays stored in the ColorOrder property of the axes.

Version History

Introduced in R2021b

See Also