PosePatch Properties
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
Orientation
— Orientation of pose plot
quaternion
object (default) | rotation matrix
Orientation of the pose plot, specified as a quaternion
(Sensor Fusion and Tracking Toolbox)
object or a rotation matrix.
Position
— Position of pose plot
[0 0 0]
(default) | three-element real-valued vector
Position of the pose plot, specified as a three-element real-valued vector.
Color and Styling
ScaleFactor
— Scale factor of pose plot
1
(default) | nonnegative scalar
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.
PatchFaceColor
— Patch face color
[0 0 0]
(default) | RGB triplet | hexadecimal color code | "r"
| "g"
| "b"
| ...
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 from0
toF
. 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 Name | Short Name | RGB Triplet | Hexadecimal Color Code | Appearance |
---|---|---|---|---|
"red" | "r" | [1 0 0] | "#FF0000" | |
"green" | "g" | [0 1 0] | "#00FF00" | |
"blue" | "b" | [0 0 1] | "#0000FF" | |
"cyan"
| "c" | [0 1 1] | "#00FFFF" | |
"magenta" | "m" | [1 0 1] | "#FF00FF" | |
"yellow" | "y" | [1 1 0] | "#FFFF00" | |
"black" | "k" | [0 0 0] | "#000000" | |
"white" | "w" | [1 1 1] | "#FFFFFF" |
MeshFileName
— Name of STL mesh file
string scalar | character vector
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.
PatchFaceAlpha
— Patch face transparency
0.1
(default) | scalar in range [0, 1]
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
Parent
— Parent axes
Axes
object
Parent axes, specified as an Axes
object.
Children
— Children
empty GraphicsPlaceholder
array | DataTip
object array
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
Visible
— Pose plot visibility
"on"
(default) | "off"
| on/off logical value
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.
HandleVisibility
— Visibility of pose patch object handle
"on"
(default) | "off"
| "callback"
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. SetHandleVisibility
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
DisplayName
— Pose plot name to display in legend
string scalar | character vector
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")
.
Type
— Type of pose plot object
'PosePatch'
(default)
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.
Annotation
— Control for including or excluding object from legend
Annotation
object
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.
SeriesIndex
— Pose plot series index
1
(default) | nonnegative integer
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
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)